From 78603aecf895b2615ea5bdc1908b54c0f01a1880 Mon Sep 17 00:00:00 2001
From: kazelee <1847801760@qq.com>
Date: 星期二, 13 五月 2025 17:00:13 +0800
Subject: [PATCH] 初始化仓库,修复部分代码问题,初步完成称重及确定终点的逻辑

---
 swagger.js                                                                             |  110 
 Models/TN_Container.cs                                                                 |   15 
 .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/76260fe3-41d2-41f5-aa6c-8c9e109555f6.vsidx   |    0 
 Dispatch/NDCHelper.cs                                                                  |   81 
 AppStart/SwaggerConfig.cs                                                              |  255 +
 Controllers/DebugController.cs                                                         |  288 +
 Devices/ScanCodeHelper.cs                                                              |   63 
 .vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/d69ea063-5070-40f2-bd3b-49ed46a407f3.vsidx    |    0 
 Devices/OpcUaHelper.cs                                                                 |  192 +
 .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/read.lock                                    |    0 
 .vs/HH.WCS.Langchao/FileContentIndex/read.lock                                         |    0 
 .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/53a0c388-cbc5-4b2b-b4eb-cd92a4ce794b.vsidx   |    0 
 .vs/HH.WCS.Mobox3.LNYKAG/FileContentIndex/3911a5fd-5b86-4edf-85b1-ca6ed438a43d.vsidx   |    0 
 .vs/HH.WCS.Langchao/FileContentIndex/4a385bfe-ecd2-4870-b27e-b29514f713d2.vsidx        |    0 
 Helpers/DbHelper.cs                                                                    |  133 
 Dispatch/NDC.cs                                                                        |  165 +
 Devices/ModbusHelper.cs                                                                |  450 ++
 .editorconfig                                                                          |  178 +
 .vs/HH.WCS.JunzhouLangchao/FileContentIndex/b5d4cc0d-d072-4a06-b41d-eed5482c7ae2.vsidx |    0 
 Models/TN_Location.cs                                                                  |   87 
 Helpers/SYSHelper.cs                                                                   |   45 
 .vs/HH.WCS.JunzhouLangchao/FileContentIndex/read.lock                                  |    0 
 Controllers/MoboxController.cs                                                         |   83 
 Controllers/ApiModel.cs                                                                |  232 +
 Helpers/LogHelper.cs                                                                   |  142 
 Helpers/ResultHelper.cs                                                                |   18 
 Helpers/DeviceProcess.cs                                                               |   28 
 Properties/AssemblyInfo.cs                                                             |   36 
 Dispatch/GZRobot.cs                                                                    |  504 +++
 .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/8c43b3a9-b113-4587-b0a9-056dfab442ea.vsidx   |    0 
 Dispatch/HostToAGV.cs                                                                  |  550 +++
 Dtos/Request/AgvRequest.cs                                                             |   39 
 Devices/TcpServer.cs                                                                   |  251 +
 ServiceCore/WMSCore.cs                                                                 |   15 
 HH.WCS.Mobox3.AnGang.csproj                                                            |  306 +
 .vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/c7280935-f5e0-40f2-8192-c372e93baa35.vsidx    |    0 
 Services/AgvService.cs                                                                 |  230 +
 HH.WCS.Mobox3.AnGang.sln                                                               |   30 
 Consts/AgvStateCode.cs                                                                 |   17 
 Helpers/TaskHelper.cs                                                                  |  218 +
 Services/MoboxService.cs                                                               |  367 ++
 ServiceCore/Monitor.cs                                                                 |  171 +
 Models/TN_CAR_IN.cs                                                                    |   19 
 .vs/HH.WCS.Mobox3.AnGang/FileContentIndex/8840fa70-8c16-4a47-a95b-02e5437b8c55.vsidx   |    0 
 AppStart/SwaggerControllerDescProvider.cs                                              |   82 
 Dtos/Request/MoboxRequest.cs                                                           |  355 ++
 AppStart/Startup.cs                                                                    |   48 
 Helpers/ContainerHelper.cs                                                             |  143 
 Dtos/Response/AgvResponse.cs                                                           |   18 
 Helpers/WCSHelper.cs                                                                   |  240 +
 Consts/AreaCode.cs                                                                     |   11 
 Dtos/Response/MoboxResponse.cs                                                         |   21 
 Program.cs                                                                             |  163 +
 .vs/HH.WCS.Langchao/FileContentIndex/64fc2de3-4821-4c46-8f63-3c1f84a578ce.vsidx        |    0 
 Models/BaseModel.cs                                                                    |   42 
 Models/TN_Task.cs                                                                      |   61 
 Controllers/AgvController.cs                                                           |   61 
 config/config.json                                                                     |   18 
 Models/TN_Task_Action.cs                                                               |   19 
 Models/Table.cs                                                                        |   26 
 .vs/HH.WCS.Mobox3.LNYKAG/FileContentIndex/read.lock                                    |    0 
 .vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/f4b60fb6-056e-496f-be20-888bbf15af32.vsidx    |    0 
 Devices/S7Helper.cs                                                                    |  423 ++
 Consts/AreaName.cs                                                                     |   12 
 ServiceCore/WCSCore.cs                                                                 |  205 +
 packages.config                                                                        |   53 
 Devices/TcpClient.cs                                                                   |   85 
 Helpers/WMSHelper.cs                                                                   |   93 
 Consts/TaskName.cs                                                                     |   14 
 Devices/PlcHelper.cs                                                                   |   99 
 AppStart/Config.cs                                                                     |   26 
 .vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/9c76bfe5-6ebd-4e0c-a47c-e101f5269325.vsidx    |    0 
 Dispatch/NDCApi.cs                                                                     |  271 +
 Controllers/WmsController.cs                                                           |   18 
 Models/TN_Loc_Container.cs                                                             |   20 
 .vs/HH.WCS.Mobox3.Template.csproj.dtbcache.json                                        |    1 
 Helpers/HttpHelper.cs                                                                  |  286 +
 Consts/AgvStateName.cs                                                                 |   17 
 Helpers/LocationHelper.cs                                                              |  548 +++
 Models/TN_WorkOrder.cs                                                                 |   17 
 AppStart/Settings.cs                                                                   |   60 
 Consts/LockStateCode.cs                                                                |   14 
 Services/DebugService.cs                                                               |   39 
 Controllers/ErpController.cs                                                           |   19 
 .vs/HH.WCS.Langchao/FileContentIndex/095323c9-fab1-4a3d-bbb9-e016bdc026ba.vsidx        |    0 
 Consts/LockStateName.cs                                                                |   17 
 App.config                                                                             |   74 
 .vs/HH.WCS.Mobox3.WeiLi/FileContentIndex/57367193-8890-401b-95eb-fa75f34fc9b1.vsidx    |    0 
 .vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/read.lock                                     |    0 
 Models/TN_CG_Detail.cs                                                                 |   42 
 Dispatch/HanAo.cs                                                                      |  165 +
 91 files changed, 9,244 insertions(+), 0 deletions(-)

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..fc9bad4
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,178 @@
+锘縖*.cs]
+
+# Default severity for all analyzer diagnostics
+dotnet_analyzer_diagnostic.severity = none
+
+# CS1591: 缂哄皯瀵瑰叕鍏卞彲瑙佺被鍨嬫垨鎴愬憳鐨�XML 娉ㄩ噴
+dotnet_diagnostic.CS1591.severity = none
+
+[*.cs]
+#### 鍛藉悕鏍峰紡 ####
+
+# 鍛藉悕瑙勫垯
+
+dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
+dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
+dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
+
+dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.types_should_be_pascal_case.symbols = types
+dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
+
+dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
+dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
+
+# 绗﹀彿瑙勮寖
+
+dotnet_naming_symbols.interface.applicable_kinds = interface
+dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.interface.required_modifiers = 
+
+dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
+dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.types.required_modifiers = 
+
+dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
+dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.non_field_members.required_modifiers = 
+
+# 鍛藉悕鏍峰紡
+
+dotnet_naming_style.begins_with_i.required_prefix = I
+dotnet_naming_style.begins_with_i.required_suffix = 
+dotnet_naming_style.begins_with_i.word_separator = 
+dotnet_naming_style.begins_with_i.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix = 
+dotnet_naming_style.pascal_case.required_suffix = 
+dotnet_naming_style.pascal_case.word_separator = 
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix = 
+dotnet_naming_style.pascal_case.required_suffix = 
+dotnet_naming_style.pascal_case.word_separator = 
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+csharp_using_directive_placement = outside_namespace:silent
+csharp_style_expression_bodied_methods = false:silent
+csharp_style_expression_bodied_constructors = false:silent
+csharp_style_expression_bodied_operators = false:silent
+csharp_style_expression_bodied_properties = true:silent
+csharp_style_expression_bodied_indexers = true:silent
+csharp_style_expression_bodied_accessors = true:silent
+csharp_style_expression_bodied_lambdas = true:silent
+csharp_style_expression_bodied_local_functions = false:silent
+csharp_style_conditional_delegate_call = true:suggestion
+csharp_style_var_for_built_in_types = false:silent
+csharp_style_var_when_type_is_apparent = false:silent
+csharp_style_var_elsewhere = false:silent
+csharp_space_around_binary_operators = before_and_after
+csharp_indent_labels = one_less_than_current
+
+dotnet_sort_system_directives_first = true
+dotnet_separate_import_directive_groups = true
+csharp_prefer_simple_using_statement = true:suggestion
+csharp_prefer_braces = true:silent
+csharp_style_namespace_declarations = block_scoped:silent
+csharp_style_prefer_method_group_conversion = true:silent
+csharp_style_prefer_top_level_statements = true:silent
+csharp_prefer_static_local_function = true:suggestion
+csharp_style_prefer_readonly_struct = true:suggestion
+csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
+csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
+csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
+csharp_style_prefer_switch_expression = true:suggestion
+csharp_style_prefer_pattern_matching = true:silent
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+csharp_style_prefer_not_pattern = true:suggestion
+csharp_style_prefer_extended_property_pattern = true:suggestion
+csharp_style_throw_expression = true:suggestion
+csharp_style_prefer_null_check_over_type_check = true:suggestion
+csharp_prefer_simple_default_expression = true:suggestion
+csharp_style_prefer_local_over_anonymous_function = true:suggestion
+csharp_style_prefer_index_operator = true:suggestion
+csharp_style_prefer_range_operator = true:suggestion
+csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
+
+[*.vb]
+#### 鍛藉悕鏍峰紡 ####
+
+# 鍛藉悕瑙勫垯
+
+dotnet_naming_rule.interface_should_be_浠i_寮�.severity = suggestion
+dotnet_naming_rule.interface_should_be_浠i_寮�.symbols = interface
+dotnet_naming_rule.interface_should_be_浠i_寮�.style = 浠i_寮�
+
+dotnet_naming_rule.绫诲瀷_should_be_甯曟柉鍗℃嫾鍐欐硶.severity = suggestion
+dotnet_naming_rule.绫诲瀷_should_be_甯曟柉鍗℃嫾鍐欐硶.symbols = 绫诲瀷
+dotnet_naming_rule.绫诲瀷_should_be_甯曟柉鍗℃嫾鍐欐硶.style = 甯曟柉鍗℃嫾鍐欐硶
+
+dotnet_naming_rule.闈炲瓧娈垫垚鍛榑should_be_甯曟柉鍗℃嫾鍐欐硶.severity = suggestion
+dotnet_naming_rule.闈炲瓧娈垫垚鍛榑should_be_甯曟柉鍗℃嫾鍐欐硶.symbols = 闈炲瓧娈垫垚鍛�+dotnet_naming_rule.闈炲瓧娈垫垚鍛榑should_be_甯曟柉鍗℃嫾鍐欐硶.style = 甯曟柉鍗℃嫾鍐欐硶
+
+# 绗﹀彿瑙勮寖
+
+dotnet_naming_symbols.interface.applicable_kinds = interface
+dotnet_naming_symbols.interface.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected
+dotnet_naming_symbols.interface.required_modifiers = 
+
+dotnet_naming_symbols.绫诲瀷.applicable_kinds = class, struct, interface, enum
+dotnet_naming_symbols.绫诲瀷.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected
+dotnet_naming_symbols.绫诲瀷.required_modifiers = 
+
+dotnet_naming_symbols.闈炲瓧娈垫垚鍛�applicable_kinds = property, event, method
+dotnet_naming_symbols.闈炲瓧娈垫垚鍛�applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected
+dotnet_naming_symbols.闈炲瓧娈垫垚鍛�required_modifiers = 
+
+# 鍛藉悕鏍峰紡
+
+dotnet_naming_style.浠i_寮�.required_prefix = I
+dotnet_naming_style.浠i_寮�.required_suffix = 
+dotnet_naming_style.浠i_寮�.word_separator = 
+dotnet_naming_style.浠i_寮�.capitalization = pascal_case
+
+dotnet_naming_style.甯曟柉鍗℃嫾鍐欐硶.required_prefix = 
+dotnet_naming_style.甯曟柉鍗℃嫾鍐欐硶.required_suffix = 
+dotnet_naming_style.甯曟柉鍗℃嫾鍐欐硶.word_separator = 
+dotnet_naming_style.甯曟柉鍗℃嫾鍐欐硶.capitalization = pascal_case
+
+dotnet_naming_style.甯曟柉鍗℃嫾鍐欐硶.required_prefix = 
+dotnet_naming_style.甯曟柉鍗℃嫾鍐欐硶.required_suffix = 
+dotnet_naming_style.甯曟柉鍗℃嫾鍐欐硶.word_separator = 
+dotnet_naming_style.甯曟柉鍗℃嫾鍐欐硶.capitalization = pascal_case
+
+[*.{cs,vb}]
+end_of_line = crlf
+dotnet_style_qualification_for_field = false:silent
+dotnet_style_qualification_for_property = false:silent
+dotnet_style_qualification_for_method = false:silent
+dotnet_style_qualification_for_event = false:silent
+tab_width = 4
+indent_size = 4
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
+dotnet_code_quality_unused_parameters = all:suggestion
+dotnet_style_readonly_field = true:suggestion
+dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
+dotnet_style_allow_multiple_blank_lines_experimental = true:silent
+dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
+dotnet_style_prefer_auto_properties = true:silent
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
+dotnet_style_prefer_conditional_expression_over_assignment = true:silent
+dotnet_style_prefer_conditional_expression_over_return = true:silent
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
+dotnet_style_prefer_compound_assignment = true:suggestion
+dotnet_style_prefer_simplified_interpolation = true:suggestion
+dotnet_style_namespace_match_folder = true:suggestion
\ No newline at end of file
diff --git a/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/b5d4cc0d-d072-4a06-b41d-eed5482c7ae2.vsidx b/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/b5d4cc0d-d072-4a06-b41d-eed5482c7ae2.vsidx
new file mode 100644
index 0000000..05edd6d
--- /dev/null
+++ b/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/b5d4cc0d-d072-4a06-b41d-eed5482c7ae2.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/read.lock b/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/read.lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/read.lock
diff --git a/.vs/HH.WCS.Langchao/FileContentIndex/095323c9-fab1-4a3d-bbb9-e016bdc026ba.vsidx b/.vs/HH.WCS.Langchao/FileContentIndex/095323c9-fab1-4a3d-bbb9-e016bdc026ba.vsidx
new file mode 100644
index 0000000..71c525f
--- /dev/null
+++ b/.vs/HH.WCS.Langchao/FileContentIndex/095323c9-fab1-4a3d-bbb9-e016bdc026ba.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Langchao/FileContentIndex/4a385bfe-ecd2-4870-b27e-b29514f713d2.vsidx b/.vs/HH.WCS.Langchao/FileContentIndex/4a385bfe-ecd2-4870-b27e-b29514f713d2.vsidx
new file mode 100644
index 0000000..621de9e
--- /dev/null
+++ b/.vs/HH.WCS.Langchao/FileContentIndex/4a385bfe-ecd2-4870-b27e-b29514f713d2.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Langchao/FileContentIndex/64fc2de3-4821-4c46-8f63-3c1f84a578ce.vsidx b/.vs/HH.WCS.Langchao/FileContentIndex/64fc2de3-4821-4c46-8f63-3c1f84a578ce.vsidx
new file mode 100644
index 0000000..42ed048
--- /dev/null
+++ b/.vs/HH.WCS.Langchao/FileContentIndex/64fc2de3-4821-4c46-8f63-3c1f84a578ce.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Langchao/FileContentIndex/read.lock b/.vs/HH.WCS.Langchao/FileContentIndex/read.lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.vs/HH.WCS.Langchao/FileContentIndex/read.lock
diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/53a0c388-cbc5-4b2b-b4eb-cd92a4ce794b.vsidx b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/53a0c388-cbc5-4b2b-b4eb-cd92a4ce794b.vsidx
new file mode 100644
index 0000000..411a4d8
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/53a0c388-cbc5-4b2b-b4eb-cd92a4ce794b.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/76260fe3-41d2-41f5-aa6c-8c9e109555f6.vsidx b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/76260fe3-41d2-41f5-aa6c-8c9e109555f6.vsidx
new file mode 100644
index 0000000..26f7a10
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/76260fe3-41d2-41f5-aa6c-8c9e109555f6.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/8840fa70-8c16-4a47-a95b-02e5437b8c55.vsidx b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/8840fa70-8c16-4a47-a95b-02e5437b8c55.vsidx
new file mode 100644
index 0000000..0d7c0f8
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/8840fa70-8c16-4a47-a95b-02e5437b8c55.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/8c43b3a9-b113-4587-b0a9-056dfab442ea.vsidx b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/8c43b3a9-b113-4587-b0a9-056dfab442ea.vsidx
new file mode 100644
index 0000000..e58c4d1
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/8c43b3a9-b113-4587-b0a9-056dfab442ea.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/read.lock b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/read.lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.AnGang/FileContentIndex/read.lock
diff --git a/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/9c76bfe5-6ebd-4e0c-a47c-e101f5269325.vsidx b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/9c76bfe5-6ebd-4e0c-a47c-e101f5269325.vsidx
new file mode 100644
index 0000000..4c8149b
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/9c76bfe5-6ebd-4e0c-a47c-e101f5269325.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/c7280935-f5e0-40f2-8192-c372e93baa35.vsidx b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/c7280935-f5e0-40f2-8192-c372e93baa35.vsidx
new file mode 100644
index 0000000..41cda8d
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/c7280935-f5e0-40f2-8192-c372e93baa35.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/d69ea063-5070-40f2-bd3b-49ed46a407f3.vsidx b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/d69ea063-5070-40f2-bd3b-49ed46a407f3.vsidx
new file mode 100644
index 0000000..0cb873b
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/d69ea063-5070-40f2-bd3b-49ed46a407f3.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/f4b60fb6-056e-496f-be20-888bbf15af32.vsidx b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/f4b60fb6-056e-496f-be20-888bbf15af32.vsidx
new file mode 100644
index 0000000..1ae30f0
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/f4b60fb6-056e-496f-be20-888bbf15af32.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/read.lock b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/read.lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.DSZSH/FileContentIndex/read.lock
diff --git a/.vs/HH.WCS.Mobox3.LNYKAG/FileContentIndex/3911a5fd-5b86-4edf-85b1-ca6ed438a43d.vsidx b/.vs/HH.WCS.Mobox3.LNYKAG/FileContentIndex/3911a5fd-5b86-4edf-85b1-ca6ed438a43d.vsidx
new file mode 100644
index 0000000..4e00dab
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.LNYKAG/FileContentIndex/3911a5fd-5b86-4edf-85b1-ca6ed438a43d.vsidx
Binary files differ
diff --git a/.vs/HH.WCS.Mobox3.LNYKAG/FileContentIndex/read.lock b/.vs/HH.WCS.Mobox3.LNYKAG/FileContentIndex/read.lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.LNYKAG/FileContentIndex/read.lock
diff --git a/.vs/HH.WCS.Mobox3.Template.csproj.dtbcache.json b/.vs/HH.WCS.Mobox3.Template.csproj.dtbcache.json
new file mode 100644
index 0000000..e552514
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.Template.csproj.dtbcache.json
@@ -0,0 +1 @@
+{"RootPath":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\HH.WCS.Mobox3.Template","ProjectFileName":"HH.WCS.Mobox3.Template.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"api\\MoboxController.cs"},{"SourceFile":"api\\AgvController.cs"},{"SourceFile":"api\\ApiModel.cs"},{"SourceFile":"core\\WMSCore.cs"},{"SourceFile":"device\\ModbusHelper.cs"},{"SourceFile":"device\\PlcHelper.cs"},{"SourceFile":"device\\TcpClient.cs"},{"SourceFile":"device\\TcpServer.cs"},{"SourceFile":"dispatch\\GZRobot.cs"},{"SourceFile":"dispatch\\NDC.cs"},{"SourceFile":"core\\Monitor.cs"},{"SourceFile":"models\\BaseModel.cs"},{"SourceFile":"models\\Area.cs"},{"SourceFile":"models\\TN_ASN_Detail.cs"},{"SourceFile":"models\\TN_ASN_Order.cs"},{"SourceFile":"models\\TN_AZ_Inventory.cs"},{"SourceFile":"models\\TN_Business_Source.cs"},{"SourceFile":"models\\CntrItemRel.cs"},{"SourceFile":"models\\TN_Check_Detail.cs"},{"SourceFile":"models\\TN_Check_List.cs"},{"SourceFile":"models\\TN_Check_Order.cs"},{"SourceFile":"models\\Container.cs"},{"SourceFile":"models\\TN_Container_Good.cs"},{"SourceFile":"models\\TN_Equipment.cs"},{"SourceFile":"models\\TN_Factory.cs"},{"SourceFile":"models\\TN_Function_Area.cs"},{"SourceFile":"models\\TN_Inspect_Detail.cs"},{"SourceFile":"models\\TN_Inspect_Order.cs"},{"SourceFile":"models\\TN_Inspect_Record.cs"},{"SourceFile":"models\\TN_LC_Log.cs"},{"SourceFile":"models\\Location.cs"},{"SourceFile":"models\\TN_Lock.cs"},{"SourceFile":"models\\LocCntrRel.cs"},{"SourceFile":"models\\TN_Loc_EQ_Link.cs"},{"SourceFile":"models\\TN_Material.cs"},{"SourceFile":"models\\TN_MQ_EQAction.cs"},{"SourceFile":"models\\TN_MQ_EQAction_Msg.cs"},{"SourceFile":"models\\TN_OnOff_Shelves.cs"},{"SourceFile":"models\\TN_OOS_Detail.cs"},{"SourceFile":"models\\TN_OOS_Order.cs"},{"SourceFile":"models\\WMSTask.cs"},{"SourceFile":"models\\TN_Outbound_Detail.cs"},{"SourceFile":"models\\TN_Outbound_Order.cs"},{"SourceFile":"models\\TN_Purchase_Detail.cs"},{"SourceFile":"models\\TN_Purchase_Order.cs"},{"SourceFile":"models\\TN_Putaway_Detail.cs"},{"SourceFile":"models\\TN_Putaway_Order.cs"},{"SourceFile":"models\\TN_Receipt_Detail.cs"},{"SourceFile":"models\\TN_Receipt_Order.cs"},{"SourceFile":"models\\ShippingDetail.cs"},{"SourceFile":"models\\ShippingOrder.cs"},{"SourceFile":"models\\TN_Sorting_Compose.cs"},{"SourceFile":"models\\TN_Sorting_Detail.cs"},{"SourceFile":"models\\SortingOrder.cs"},{"SourceFile":"models\\TN_Sorting_Result.cs"},{"SourceFile":"models\\TN_Supplier.cs"},{"SourceFile":"models\\WCSTask.cs"},{"SourceFile":"models\\TaskAction.cs"},{"SourceFile":"models\\TN_Warehouse.cs"},{"SourceFile":"process\\DeviceProcess.cs"},{"SourceFile":"core\\WCSCore.cs"},{"SourceFile":"api\\WmsController.cs"},{"SourceFile":"api\\ApiHelper.cs"},{"SourceFile":"dispatch\\HostToAGV.cs"},{"SourceFile":"process\\TaskProcess.cs"},{"SourceFile":"util\\LogHelper.cs"},{"SourceFile":"util\\StrHelper.cs"},{"SourceFile":"util\\STAttribute.cs"},{"SourceFile":"wms\\ContainerHelper.cs"},{"SourceFile":"wms\\LocationHelper.cs"},{"SourceFile":"wms\\WMSHelper.cs"},{"SourceFile":"wms\\SYSHelper.cs"},{"SourceFile":"wms\\TEST.cs"},{"SourceFile":"device\\OITcpHelper.cs"},{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"util\\Settings.cs"},{"SourceFile":"util\\SqlHelper.cs"},{"SourceFile":"api\\Startup.cs"},{"SourceFile":"dispatch\\NDCHelper.cs"},{"SourceFile":"util\\HttpHelper.cs"},{"SourceFile":"wms\\NormalArea.cs"},{"SourceFile":"wms\\WCSHelper.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.6.1.AssemblyAttributes.cs"}],"References":[{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\HH.WCS.Mobox3.Template\\packages\\EasyModbusTCP.5.6.0\\lib\\net40\\EasyModbus.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\Microsoft.Bcl.AsyncInterfaces.7.0.0\\lib\\netstandard2.0\\Microsoft.Bcl.AsyncInterfaces.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\Microsoft.Owin.4.2.2\\lib\\net45\\Microsoft.Owin.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\Microsoft.Owin.Host.HttpListener.4.2.2\\lib\\net45\\Microsoft.Owin.Host.HttpListener.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\Microsoft.Owin.Hosting.4.2.2\\lib\\net45\\Microsoft.Owin.Hosting.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\Microsoft.Win32.Primitives.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\netfx.force.conflicts.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\netstandard.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\IIS\\Microsoft Web Deploy V3\\Newtonsoft.Json.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\NLog.5.1.1\\lib\\net45\\NLog.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\Owin.1.0\\lib\\net40\\Owin.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\SqlSugar.5.1.3.47\\lib\\SqlSugar.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.AppContext.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Buffers.4.5.1\\lib\\net461\\System.Buffers.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Collections.Concurrent.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Collections.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Collections.NonGeneric.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Collections.Specialized.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.ComponentModel.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.ComponentModel.EventBasedAsync.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.ComponentModel.Primitives.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.ComponentModel.TypeConverter.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Configuration.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Configuration.Install.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Console.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Data.Common.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Diagnostics.Contracts.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Diagnostics.Debug.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Diagnostics.FileVersionInfo.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Diagnostics.Process.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Diagnostics.StackTrace.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Diagnostics.TextWriterTraceListener.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Diagnostics.Tools.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Diagnostics.TraceSource.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Diagnostics.Tracing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Drawing.Primitives.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Dynamic.Runtime.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Globalization.Calendars.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Globalization.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Globalization.Extensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.Compression.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.Compression.ZipFile.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.FileSystem.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.FileSystem.DriveInfo.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.FileSystem.Primitives.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.FileSystem.Watcher.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.IsolatedStorage.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.MemoryMappedFiles.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.Pipes.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.IO.UnmanagedMemoryStream.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Linq.Expressions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Linq.Parallel.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Linq.Queryable.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Memory.4.5.5\\lib\\net461\\System.Memory.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Net.Http.Formatting.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.NameResolution.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.NetworkInformation.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.Ping.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.Primitives.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.Requests.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.Security.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.Sockets.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.WebHeaderCollection.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.WebSockets.Client.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Net.WebSockets.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Numerics.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Numerics.Vectors.4.5.0\\lib\\net46\\System.Numerics.Vectors.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.ObjectModel.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Reflection.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Reflection.Extensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Reflection.Primitives.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Resources.Reader.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Resources.ResourceManager.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Resources.Writer.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Runtime.CompilerServices.Unsafe.6.0.0\\lib\\net461\\System.Runtime.CompilerServices.Unsafe.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.CompilerServices.VisualC.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.Extensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.Handles.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.InteropServices.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.InteropServices.RuntimeInformation.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.Numerics.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.Serialization.Formatters.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.Serialization.Json.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.Serialization.Primitives.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Runtime.Serialization.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Security.Claims.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Security.Cryptography.Algorithms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Security.Cryptography.Csp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Security.Cryptography.Encoding.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Security.Cryptography.Primitives.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Security.Cryptography.X509Certificates.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Security.Principal.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Security.SecureString.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.ServiceProcess.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Text.Encoding.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Text.Encoding.Extensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Text.Encodings.Web.7.0.0\\lib\\netstandard2.0\\System.Text.Encodings.Web.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Text.Json.7.0.0\\lib\\netstandard2.0\\System.Text.Json.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Text.RegularExpressions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Threading.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Threading.Overlapped.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Threading.Tasks.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Threading.Tasks.Extensions.4.5.4\\lib\\net461\\System.Threading.Tasks.Extensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Threading.Tasks.Parallel.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Threading.Thread.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Threading.ThreadPool.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Threading.Timer.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.ValueTuple.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Web.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Web.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\System.Web.Http.Owin.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Web.Services.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.6.1\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Xml.ReaderWriter.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Xml.XDocument.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Xml.XmlDocument.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Xml.XmlSerializer.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Xml.XPath.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\Microsoft.NET.Build.Extensions\\net461\\lib\\System.Xml.XPath.XDocument.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\Topshelf.4.3.0\\lib\\net452\\Topshelf.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\packages\\Topshelf.NLog.4.3.0\\lib\\net452\\Topshelf.NLog.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\HH.WCS.Mobox3.Template\\bin\\Debug\\HH.WCS.Mobox3.Template.exe","OutputItemRelativePath":"HH.WCS.Mobox3.Template.exe"},{"OutputItemFullPath":"D:\\ams\\wcs\\HH.WCS.Mobox3 - 鍓湰\\HH.WCS.Mobox3.Template\\bin\\Debug\\HH.WCS.Mobox3.Template.pdb","OutputItemRelativePath":"HH.WCS.Mobox3.Template.pdb"}],"CopyToOutputEntries":[]}
\ No newline at end of file
diff --git a/.vs/HH.WCS.Mobox3.WeiLi/FileContentIndex/57367193-8890-401b-95eb-fa75f34fc9b1.vsidx b/.vs/HH.WCS.Mobox3.WeiLi/FileContentIndex/57367193-8890-401b-95eb-fa75f34fc9b1.vsidx
new file mode 100644
index 0000000..9ad48f2
--- /dev/null
+++ b/.vs/HH.WCS.Mobox3.WeiLi/FileContentIndex/57367193-8890-401b-95eb-fa75f34fc9b1.vsidx
Binary files differ
diff --git a/App.config b/App.config
new file mode 100644
index 0000000..189fb44
--- /dev/null
+++ b/App.config
@@ -0,0 +1,74 @@
+锘�?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
+  </startup>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-5.3.0.0" newVersion="5.3.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.122.21.1" newVersion="4.122.21.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-8.0.0.3" newVersion="8.0.0.3" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-1.9.0.0" newVersion="1.9.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Web.Infrastructure" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Formats.Asn1" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.1" newVersion="6.0.0.1" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>
diff --git a/AppStart/Config.cs b/AppStart/Config.cs
new file mode 100644
index 0000000..ad0217f
--- /dev/null
+++ b/AppStart/Config.cs
@@ -0,0 +1,26 @@
+锘縰sing System.Collections.Generic;
+
+// 鏍规嵁 JSON 鏂囦欢 鐢熸垚瀵瑰簲鐨�C# 瀵硅薄锛涚綉鍧�細https://json2csharp.com/
+// 1. 灏�config.json 鏂囦欢澶嶅埗鍒扮綉鍧�腑
+// 2. 灏嗗緱鍒扮殑鍐呭澶嶅埗鍒�namespace HH.WCS.Mobox3.{椤圭洰浠e彿}.AppStart { } 澶ф嫭鍙峰唴閮紙C# 10 鎵嶆敮鎸�鏂囦欢鑼冨洿鍐呯殑鍛藉悕绌洪棿锛�+// 3. 灏�Root 鏇村悕涓�Config
+// 琛ュ厖锛氳繖绉嶆柟寮忔病娉曚繚鐣欐敞閲婏紝闇�鐔熸倝 Config 鏂囦欢鐨勫瓧娈靛惈涔夛紙鏆備笉鑰冭檻浠g爜鐢熸垚 Json 鏂囦欢锛�+
+namespace HH.WCS.Mobox3.AnGang.AppStart {
+    // Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
+    public class Area {
+        public string Name { get; set; }
+        public List<string> Codes { get; set; }
+    }
+
+    public class Config {
+        public string WebApiUrl { get; set; }
+        public string RCSApiUrl { get; set; }
+        public string NDCApiUrl { get; set; }
+        public string SqlServer { get; set; }
+        public string TCPServerIP { get; set; }
+        public int TCPServerPort { get; set; }
+        public List<Area> Areas { get; set; }
+    }
+
+}
diff --git a/AppStart/Settings.cs b/AppStart/Settings.cs
new file mode 100644
index 0000000..2b8a254
--- /dev/null
+++ b/AppStart/Settings.cs
@@ -0,0 +1,60 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.IO;
+
+using HH.WCS.Mobox3.AnGang;
+
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace HH.WCS.Mobox3.AnGang.AppStart {
+    public class Settings {
+        /// <summary>
+        /// 閰嶇疆鏂囦欢
+        /// </summary>
+        public static Config Config { get; set; }
+
+        /// <summary>
+        /// 搴撳尯瀛楀吀锛堝姞杞藉悗灏变笉鍙橈級
+        /// </summary>
+        public static Dictionary<string, List<string>> AreaMap { get; set; } = new Dictionary<string, List<string>>();
+
+        public static void Init() {
+            // 鍔犺浇閰嶇疆鏂囦欢
+            LoadJson();
+
+            // 閽堝 Areas 杩涜杞崲锛氬皢 Config 鐨�List 鍔犺浇鍒�Dict 涓�+            LoadAreas();
+        }
+
+        private static void LoadJson() {
+            LogHelper.Info("鍔犺浇閰嶇疆鏂囦欢淇℃伅 寮�");
+            // JSON 鏂囦欢璺緞
+            string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "./config/config.json");
+
+            try {
+                // 璇诲彇 JSON 鏂囦欢鍐呭
+                string jsonContent = File.ReadAllText(filePath);
+
+                // 鍙嶅簭鍒楀寲涓�Config 瀵硅薄
+                Config = JsonConvert.DeserializeObject<Config>(jsonContent);
+            }
+            catch (FileNotFoundException) {
+                LogHelper.Info("JSON 鏂囦欢鏈壘鍒�);
+            }
+            catch (JsonException ex) {
+                LogHelper.Info($"JSON 瑙f瀽閿欒: {ex.Message}");
+            }
+            catch (Exception ex) {
+                LogHelper.Info($"鍙戠敓閿欒: {ex.Message}");
+            }
+            LogHelper.Info("鍔犺浇閰嶇疆鏂囦欢淇℃伅 瀹屾垚");
+        }
+
+        private static void LoadAreas() {
+            foreach (var area in Config.Areas) {
+                AreaMap.Add(area.Name, area.Codes);
+            }
+        }
+    }
+}
diff --git a/AppStart/Startup.cs b/AppStart/Startup.cs
new file mode 100644
index 0000000..e044d06
--- /dev/null
+++ b/AppStart/Startup.cs
@@ -0,0 +1,48 @@
+锘縰sing System;
+using System.Linq;
+using System.Net.Http.Formatting;
+using System.Threading.Tasks;
+using System.Web.Http;
+using Microsoft.Owin;
+using Owin;
+using Swashbuckle.Application;
+
+[assembly: OwinStartup(typeof(HH.WCS.Mobox3.AnGang.Startup))]
+
+namespace HH.WCS.Mobox3.AnGang {
+    public class Startup {
+        public void Configuration(IAppBuilder app) {
+            // 鏈夊叧濡備綍閰嶇疆搴旂敤绋嬪簭鐨勮缁嗕俊鎭紝璇疯闂�https://go.microsoft.com/fwlink/?LinkID=316888
+            HttpConfiguration config = new HttpConfiguration();
+            config.Routes.MapHttpRoute(
+                name: "DefaultApi",
+                routeTemplate: "api/{controller}/{action}/{id}",
+                defaults: new { id = RouteParameter.Optional }
+                );
+            // Web API routes
+            //config.MapHttpAttributeRoutes();
+            //config.EnableSwagger(c => c.SingleApiVersion("v1", "hh wms api"))
+            //    .EnableSwaggerUi();
+            //config.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
+            //config.Formatters.Add(new JsonMediaTypeFormatter());
+
+
+            //WebApiConfig.Register(config);
+            // Web API routes
+            config.MapHttpAttributeRoutes();
+            config.EnableSwagger(c => {
+                c.SingleApiVersion("v1", "hh wms api");
+                c.IncludeXmlComments(System.AppDomain.CurrentDomain.BaseDirectory + "\\HH.WCS.Mobox3.DSZSH.xml");
+                c.CustomProvider((defaultProvider) => new SwaggerCacheProvider(defaultProvider, $@"{System.AppDomain.CurrentDomain.BaseDirectory}\\HH.WCS.Mobox3.DSZSH.xml"));
+                c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());
+            }
+            ).EnableSwaggerUi(c => {
+                c.InjectJavaScript(System.Reflection.Assembly.GetExecutingAssembly(), "swagger.js");
+            });
+            config.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
+            config.Formatters.Add(new JsonMediaTypeFormatter());
+
+            app.UseWebApi(config);
+        }
+    }
+}
diff --git a/AppStart/SwaggerConfig.cs b/AppStart/SwaggerConfig.cs
new file mode 100644
index 0000000..557097d
--- /dev/null
+++ b/AppStart/SwaggerConfig.cs
@@ -0,0 +1,255 @@
+using System.Web.Http;
+using WebActivatorEx;
+using HH.WCS.Mobox3.Template;
+using Swashbuckle.Application;
+
+[assembly: PreApplicationStartMethod(typeof(SwaggerConfig), "Register")]
+
+namespace HH.WCS.Mobox3.Template
+{
+    public class SwaggerConfig
+    {
+        public static void Register()
+        {
+            var thisAssembly = typeof(SwaggerConfig).Assembly;
+
+            GlobalConfiguration.Configuration
+                .EnableSwagger(c =>
+                    {
+                        // By default, the service root url is inferred from the request used to access the docs.
+                        // However, there may be situations (e.g. proxy and load-balanced environments) where this does not
+                        // resolve correctly. You can workaround this by providing your own code to determine the root URL.
+                        //
+                        //c.RootUrl(req => GetRootUrlFromAppConfig());
+
+                        // If schemes are not explicitly provided in a Swagger 2.0 document, then the scheme used to access
+                        // the docs is taken as the default. If your API supports multiple schemes and you want to be explicit
+                        // about them, you can use the "Schemes" option as shown below.
+                        //
+                        //c.Schemes(new[] { "http", "https" });
+
+                        // Use "SingleApiVersion" to describe a single version API. Swagger 2.0 includes an "Info" object to
+                        // hold additional metadata for an API. Version and title are required but you can also provide
+                        // additional fields by chaining methods off SingleApiVersion.
+                        //
+                        c.SingleApiVersion("v1", "HH.WCS.Mobox3.Template");
+
+                        // If you want the output Swagger docs to be indented properly, enable the "PrettyPrint" option.
+                        //
+                        //c.PrettyPrint();
+
+                        // If your API has multiple versions, use "MultipleApiVersions" instead of "SingleApiVersion".
+                        // In this case, you must provide a lambda that tells Swashbuckle which actions should be
+                        // included in the docs for a given API version. Like "SingleApiVersion", each call to "Version"
+                        // returns an "Info" builder so you can provide additional metadata per API version.
+                        //
+                        //c.MultipleApiVersions(
+                        //    (apiDesc, targetApiVersion) => ResolveVersionSupportByRouteConstraint(apiDesc, targetApiVersion),
+                        //    (vc) =>
+                        //    {
+                        //        vc.Version("v2", "Swashbuckle Dummy API V2");
+                        //        vc.Version("v1", "Swashbuckle Dummy API V1");
+                        //    });
+
+                        // You can use "BasicAuth", "ApiKey" or "OAuth2" options to describe security schemes for the API.
+                        // See https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md for more details.
+                        // NOTE: These only define the schemes and need to be coupled with a corresponding "security" property
+                        // at the document or operation level to indicate which schemes are required for an operation. To do this,
+                        // you'll need to implement a custom IDocumentFilter and/or IOperationFilter to set these properties
+                        // according to your specific authorization implementation
+                        //
+                        //c.BasicAuth("basic")
+                        //    .Description("Basic HTTP Authentication");
+                        //
+						// NOTE: You must also configure 'EnableApiKeySupport' below in the SwaggerUI section
+                        //c.ApiKey("apiKey")
+                        //    .Description("API Key Authentication")
+                        //    .Name("apiKey")
+                        //    .In("header");
+                        //
+                        //c.OAuth2("oauth2")
+                        //    .Description("OAuth2 Implicit Grant")
+                        //    .Flow("implicit")
+                        //    .AuthorizationUrl("http://petstore.swagger.wordnik.com/api/oauth/dialog")
+                        //    //.TokenUrl("https://tempuri.org/token")
+                        //    .Scopes(scopes =>
+                        //    {
+                        //        scopes.Add("read", "Read access to protected resources");
+                        //        scopes.Add("write", "Write access to protected resources");
+                        //    });
+
+                        // Set this flag to omit descriptions for any actions decorated with the Obsolete attribute
+                        //c.IgnoreObsoleteActions();
+
+                        // Each operation be assigned one or more tags which are then used by consumers for various reasons.
+                        // For example, the swagger-ui groups operations according to the first tag of each operation.
+                        // By default, this will be controller name but you can use the "GroupActionsBy" option to
+                        // override with any value.
+                        //
+                        //c.GroupActionsBy(apiDesc => apiDesc.HttpMethod.ToString());
+
+                        // You can also specify a custom sort order for groups (as defined by "GroupActionsBy") to dictate
+                        // the order in which operations are listed. For example, if the default grouping is in place
+                        // (controller name) and you specify a descending alphabetic sort order, then actions from a
+                        // ProductsController will be listed before those from a CustomersController. This is typically
+                        // used to customize the order of groupings in the swagger-ui.
+                        //
+                        //c.OrderActionGroupsBy(new DescendingAlphabeticComparer());
+
+                        // If you annotate Controllers and API Types with
+                        // Xml comments (http://msdn.microsoft.com/en-us/library/b2s063f7(v=vs.110).aspx), you can incorporate
+                        // those comments into the generated docs and UI. You can enable this by providing the path to one or
+                        // more Xml comment files.
+                        //
+                        //c.IncludeXmlComments(GetXmlCommentsPath());
+
+                        // Swashbuckle makes a best attempt at generating Swagger compliant JSON schemas for the various types
+                        // exposed in your API. However, there may be occasions when more control of the output is needed.
+                        // This is supported through the "MapType" and "SchemaFilter" options:
+                        //
+                        // Use the "MapType" option to override the Schema generation for a specific type.
+                        // It should be noted that the resulting Schema will be placed "inline" for any applicable Operations.
+                        // While Swagger 2.0 supports inline definitions for "all" Schema types, the swagger-ui tool does not.
+                        // It expects "complex" Schemas to be defined separately and referenced. For this reason, you should only
+                        // use the "MapType" option when the resulting Schema is a primitive or array type. If you need to alter a
+                        // complex Schema, use a Schema filter.
+                        //
+                        //c.MapType<ProductType>(() => new Schema { type = "integer", format = "int32" });
+
+                        // If you want to post-modify "complex" Schemas once they've been generated, across the board or for a
+                        // specific type, you can wire up one or more Schema filters.
+                        //
+                        //c.SchemaFilter<ApplySchemaVendorExtensions>();
+
+                        // In a Swagger 2.0 document, complex types are typically declared globally and referenced by unique
+                        // Schema Id. By default, Swashbuckle does NOT use the full type name in Schema Ids. In most cases, this
+                        // works well because it prevents the "implementation detail" of type namespaces from leaking into your
+                        // Swagger docs and UI. However, if you have multiple types in your API with the same class name, you'll
+                        // need to opt out of this behavior to avoid Schema Id conflicts.
+                        //
+                        //c.UseFullTypeNameInSchemaIds();
+
+                        // Alternatively, you can provide your own custom strategy for inferring SchemaId's for
+                        // describing "complex" types in your API.
+                        //
+                        //c.SchemaId(t => t.FullName.Contains('`') ? t.FullName.Substring(0, t.FullName.IndexOf('`')) : t.FullName);
+
+                        // Set this flag to omit schema property descriptions for any type properties decorated with the
+                        // Obsolete attribute
+                        //c.IgnoreObsoleteProperties();
+
+                        // In accordance with the built in JsonSerializer, Swashbuckle will, by default, describe enums as integers.
+                        // You can change the serializer behavior by configuring the StringToEnumConverter globally or for a given
+                        // enum type. Swashbuckle will honor this change out-of-the-box. However, if you use a different
+                        // approach to serialize enums as strings, you can also force Swashbuckle to describe them as strings.
+                        //
+                        //c.DescribeAllEnumsAsStrings();
+
+                        // Similar to Schema filters, Swashbuckle also supports Operation and Document filters:
+                        //
+                        // Post-modify Operation descriptions once they've been generated by wiring up one or more
+                        // Operation filters.
+                        //
+                        //c.OperationFilter<AddDefaultResponse>();
+                        //
+                        // If you've defined an OAuth2 flow as described above, you could use a custom filter
+                        // to inspect some attribute on each action and infer which (if any) OAuth2 scopes are required
+                        // to execute the operation
+                        //
+                        //c.OperationFilter<AssignOAuth2SecurityRequirements>();
+
+                        // Post-modify the entire Swagger document by wiring up one or more Document filters.
+                        // This gives full control to modify the final SwaggerDocument. You should have a good understanding of
+                        // the Swagger 2.0 spec. - https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md
+                        // before using this option.
+                        //
+                        //c.DocumentFilter<ApplyDocumentVendorExtensions>();
+
+                        // In contrast to WebApi, Swagger 2.0 does not include the query string component when mapping a URL
+                        // to an action. As a result, Swashbuckle will raise an exception if it encounters multiple actions
+                        // with the same path (sans query string) and HTTP method. You can workaround this by providing a
+                        // custom strategy to pick a winner or merge the descriptions for the purposes of the Swagger docs
+                        //
+                        //c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());
+
+                        // Wrap the default SwaggerGenerator with additional behavior (e.g. caching) or provide an
+                        // alternative implementation for ISwaggerProvider with the CustomProvider option.
+                        //
+                        //c.CustomProvider((defaultProvider) => new CachingSwaggerProvider(defaultProvider));
+                    })
+                .EnableSwaggerUi(c =>
+                    {
+                        // Use the "DocumentTitle" option to change the Document title.
+                        // Very helpful when you have multiple Swagger pages open, to tell them apart.
+                        //
+                        //c.DocumentTitle("My Swagger UI");
+
+                        // Use the "InjectStylesheet" option to enrich the UI with one or more additional CSS stylesheets.
+                        // The file must be included in your project as an "Embedded Resource", and then the resource's
+                        // "Logical Name" is passed to the method as shown below.
+                        //
+                        //c.InjectStylesheet(containingAssembly, "Swashbuckle.Dummy.SwaggerExtensions.testStyles1.css");
+
+                        // Use the "InjectJavaScript" option to invoke one or more custom JavaScripts after the swagger-ui
+                        // has loaded. The file must be included in your project as an "Embedded Resource", and then the resource's
+                        // "Logical Name" is passed to the method as shown above.
+                        //
+                        //c.InjectJavaScript(thisAssembly, "Swashbuckle.Dummy.SwaggerExtensions.testScript1.js");
+
+                        // The swagger-ui renders boolean data types as a dropdown. By default, it provides "true" and "false"
+                        // strings as the possible choices. You can use this option to change these to something else,
+                        // for example 0 and 1.
+                        //
+                        //c.BooleanValues(new[] { "0", "1" });
+
+                        // By default, swagger-ui will validate specs against swagger.io's online validator and display the result
+                        // in a badge at the bottom of the page. Use these options to set a different validator URL or to disable the
+                        // feature entirely.
+                        //c.SetValidatorUrl("http://localhost/validator");
+                        //c.DisableValidator();
+
+                        // Use this option to control how the Operation listing is displayed.
+                        // It can be set to "None" (default), "List" (shows operations for each resource),
+                        // or "Full" (fully expanded: shows operations and their details).
+                        //
+                        //c.DocExpansion(DocExpansion.List);
+
+                        // Specify which HTTP operations will have the 'Try it out!' option. An empty paramter list disables
+                        // it for all operations.
+                        //
+                        //c.SupportedSubmitMethods("GET", "HEAD");
+
+                        // Use the CustomAsset option to provide your own version of assets used in the swagger-ui.
+                        // It's typically used to instruct Swashbuckle to return your version instead of the default
+                        // when a request is made for "index.html". As with all custom content, the file must be included
+                        // in your project as an "Embedded Resource", and then the resource's "Logical Name" is passed to
+                        // the method as shown below.
+                        //
+                        //c.CustomAsset("index", containingAssembly, "YourWebApiProject.SwaggerExtensions.index.html");
+
+                        // If your API has multiple versions and you've applied the MultipleApiVersions setting
+                        // as described above, you can also enable a select box in the swagger-ui, that displays
+                        // a discovery URL for each version. This provides a convenient way for users to browse documentation
+                        // for different API versions.
+                        //
+                        //c.EnableDiscoveryUrlSelector();
+
+                        // If your API supports the OAuth2 Implicit flow, and you've described it correctly, according to
+                        // the Swagger 2.0 specification, you can enable UI support as shown below.
+                        //
+                        //c.EnableOAuth2Support(
+                        //    clientId: "test-client-id",
+                        //    clientSecret: null,
+                        //    realm: "test-realm",
+                        //    appName: "Swagger UI"
+                        //    //additionalQueryStringParams: new Dictionary<string, string>() { { "foo", "bar" } }
+                        //);
+
+                        // If your API supports ApiKey, you can override the default values.
+                        // "apiKeyIn" can either be "query" or "header"
+                        //
+                        //c.EnableApiKeySupport("apiKey", "header");
+                    });
+        }
+    }
+}
diff --git a/AppStart/SwaggerControllerDescProvider.cs b/AppStart/SwaggerControllerDescProvider.cs
new file mode 100644
index 0000000..954b5be
--- /dev/null
+++ b/AppStart/SwaggerControllerDescProvider.cs
@@ -0,0 +1,82 @@
+锘縰sing Swashbuckle.Swagger;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.IO;
+using System.Xml;
+
+namespace HH.WCS.Mobox3.AnGang {
+    /// <summary>
+    /// Swagger 鏄剧ず鎺у埗鍣ㄧ殑鎻忚堪
+    /// </summary>
+    public class SwaggerCacheProvider : ISwaggerProvider
+    {
+        private readonly ISwaggerProvider _swaggerProvider;
+        private static ConcurrentDictionary<string, SwaggerDocument> _cache = new ConcurrentDictionary<string, SwaggerDocument>();
+        private readonly string _xmlPath;
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="swaggerProvider"></param>
+        /// <param name="xmlpath">xml鏂囨。璺緞</param>
+        public SwaggerCacheProvider(ISwaggerProvider swaggerProvider, string xmlpath)
+        {
+            _swaggerProvider = swaggerProvider;
+            _xmlPath = xmlpath;
+        }
+
+        public SwaggerDocument GetSwagger(string rootUrl, string apiVersion)
+        {
+            var cacheKey = string.Format("{0}_{1}", rootUrl, apiVersion);
+            //鍙鍙栦竴娆�+            if (!_cache.TryGetValue(cacheKey, out SwaggerDocument srcDoc))
+            {
+                srcDoc = _swaggerProvider.GetSwagger(rootUrl, apiVersion);
+
+                srcDoc.vendorExtensions = new Dictionary<string, object>
+            {
+                { "ControllerDesc", GetControllerDesc() }
+            };
+                _cache.TryAdd(cacheKey, srcDoc);
+            }
+            return srcDoc;
+        }
+
+        /// <summary>
+        /// 浠嶢PI鏂囨。涓鍙栨帶鍒跺櫒鎻忚堪
+        /// </summary>
+        /// <returns>鎵�湁鎺у埗鍣ㄦ弿杩�/returns>
+        public ConcurrentDictionary<string, string> GetControllerDesc()
+        {
+            ConcurrentDictionary<string, string> controllerDescDict = new ConcurrentDictionary<string, string>();
+            if (File.Exists(_xmlPath))
+            {
+                XmlDocument xmldoc = new XmlDocument();
+                xmldoc.Load(_xmlPath);
+
+                string[] arrPath;
+                int cCount = "Controller".Length;
+                foreach (XmlNode node in xmldoc.SelectNodes("//member"))
+                {
+                    string type = node.Attributes["name"].Value;
+                    if (type.StartsWith("T:"))
+                    {
+                        arrPath = type.Split('.');
+                        string controllerName = arrPath[arrPath.Length - 1];
+                        if (controllerName.EndsWith("Controller"))  //鎺у埗鍣�+                        {
+                            //鑾峰彇鎺у埗鍣ㄦ敞閲�+                            XmlNode summaryNode = node.SelectSingleNode("summary");
+                            string key = controllerName.Remove(controllerName.Length - cCount, cCount);
+                            if (summaryNode != null && !string.IsNullOrEmpty(summaryNode.InnerText) && !controllerDescDict.ContainsKey(key))
+                            {
+                                controllerDescDict.TryAdd(key, summaryNode.InnerText.Trim());
+                            }
+                        }
+                    }
+                }
+            }
+            return controllerDescDict;
+        }
+    }
+}
diff --git a/Consts/AgvStateCode.cs b/Consts/AgvStateCode.cs
new file mode 100644
index 0000000..32d2048
--- /dev/null
+++ b/Consts/AgvStateCode.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Consts {
+    public class AgvStateCode {
+        public const int 鎵ц = 1;
+        public const int 瀹屾垚 = 2;
+        public const int 寮�鍙栬揣 = 3;
+        public const int 鍙栬揣瀹屾垚 = 4;
+        public const int 寮�鍗歌揣 = 5;
+        public const int 鍗歌揣瀹屾垚 = 6;
+        public const int 寮傚父 = 7;
+    }
+}
diff --git a/Consts/AgvStateName.cs b/Consts/AgvStateName.cs
new file mode 100644
index 0000000..6e7f817
--- /dev/null
+++ b/Consts/AgvStateName.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Consts {
+    public class AgvStateName {
+        public const string 鎵ц = "鎵ц";
+        public const string 瀹屾垚 = "瀹屾垚";
+        public const string 寮�鍙栬揣 = "寮�鍙栬揣";
+        public const string 鍙栬揣瀹屾垚 = "鍙栬揣瀹屾垚";
+        public const string 寮�鍗歌揣 = "寮�鍗歌揣";
+        public const string 鍗歌揣瀹屾垚 = "鍗歌揣瀹屾垚";
+        public const string 寮傚父 = "寮傚父";
+    }
+}
diff --git a/Consts/AreaCode.cs b/Consts/AreaCode.cs
new file mode 100644
index 0000000..cb3a8ee
--- /dev/null
+++ b/Consts/AreaCode.cs
@@ -0,0 +1,11 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Consts {
+    public class AreaCode {
+        public const string 鏀跺彂璐т綅鍖�= "P";
+    }
+}
diff --git a/Consts/AreaName.cs b/Consts/AreaName.cs
new file mode 100644
index 0000000..4b457a5
--- /dev/null
+++ b/Consts/AreaName.cs
@@ -0,0 +1,12 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Consts {
+    public class AreaName {
+        public const string 鏀跺彂璐т綅鍖�= "鏀跺彂璐т綅鍖�;
+        public const string 璐ф灦鍖�= "璐ф灦鍖�;
+    }
+}
diff --git a/Consts/LockStateCode.cs b/Consts/LockStateCode.cs
new file mode 100644
index 0000000..f61e5be
--- /dev/null
+++ b/Consts/LockStateCode.cs
@@ -0,0 +1,14 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Consts {
+    public class LockStateCode {
+        public const int 鏃�= 0;
+        public const int 鍏ュ簱閿�= 1;
+        public const int 鍑哄簱閿�= 2;
+        public const int 鍏朵粬閿�= 3;
+    }
+}
diff --git a/Consts/LockStateName.cs b/Consts/LockStateName.cs
new file mode 100644
index 0000000..8fad39f
--- /dev/null
+++ b/Consts/LockStateName.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Consts {
+    /// <summary>
+    /// [鍘熷垯涓婁笉淇敼] 浣嶇疆閿佸悕绉�瀛楃涓插父閲�+    /// </summary>
+    public class LockStateName {
+        public const string 鏃�= "鏃�;
+        public const string 鍏ュ簱閿�= "鍏ュ簱閿�;
+        public const string 鍑哄簱閿�= "鍑哄簱閿�;
+        public const string 鍏朵粬閿�= "鍏朵粬閿�;
+    }
+}
diff --git a/Consts/TaskName.cs b/Consts/TaskName.cs
new file mode 100644
index 0000000..1885d86
--- /dev/null
+++ b/Consts/TaskName.cs
@@ -0,0 +1,14 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Consts {
+    public class TaskName {
+        public const string 璐у搧鍏ュ簱 = "璐у搧鍏ュ簱";
+        public const string 浜у搧閮ㄥ垎鍑哄簱 = "浜у搧閮ㄥ垎鍑哄簱";
+        public const string 浜у搧閮ㄥ垎鍥炲簱 = "浜у搧閮ㄥ垎鍥炲簱";
+        public const string 鐩樼偣鐞嗚揣鍑哄簱 = "鐩樼偣鐞嗚揣鍑哄簱";
+    }
+}
diff --git a/Controllers/AgvController.cs b/Controllers/AgvController.cs
new file mode 100644
index 0000000..16c1fe5
--- /dev/null
+++ b/Controllers/AgvController.cs
@@ -0,0 +1,61 @@
+锘縰sing HH.WCS.Mobox3.AnGang.ServiceCore;
+using HH.WCS.Mobox3.AnGang.Dispatch;
+using HH.WCS.Mobox3.AnGang.process;
+using HH.WCS.Mobox3.AnGang.Helper;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Web.Http;
+using static HH.WCS.Mobox3.AnGang.Dispatch.NDC;
+using System.Linq;
+using HH.WCS.Mobox3.AnGang.config;
+
+using HH.WCS.Mobox3.AnGang.Services;
+using static HH.WCS.Mobox3.AnGang.Dtos.Request.AgvRequest;
+using static HH.WCS.Mobox3.AnGang.Dtos.Response.AgvResponse;
+using static HH.WCS.Mobox3.AnGang.Controllers.ApiModel;
+
+namespace HH.WCS.Mobox3.AnGang.Controllers
+{
+    /// <summary>
+    /// 璁惧淇℃伅涓婃姤锛坔osttoagv涓婃姤銆佹澀濂ュ爢鍨涙満銆佸浗鑷猘gv锛�+    /// </summary>
+    [RoutePrefix("agv")]
+    public class AgvController : ApiController
+    {
+        ///// <summary>
+        ///// NDC HostToAGV 浠诲姟鐘舵�鍥炴姤
+        ///// </summary>
+        ///// <param name="model"></param>
+        ///// <returns></returns>
+        //[HttpPost]
+        //[Route("AGVCallbackState")]
+        //public ReturnResult AGVCallbackState(AgvTaskState model)
+        //{
+        //    LogHelper.Info("NDC HostToAGV浠诲姟鐘舵�鍥炴姤锛� + JsonConvert.SerializeObject(model), "HosttoagvTask");
+        //    return AgvService.OperateAgvTaskStatus(model);
+        //}
+
+        /// <summary>
+        /// RCS鍥借嚜AGV浠诲姟鐘舵�鍥炴姤
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("orderStatusReport")]
+        public GzResult orderStatusReport(orderStatusReportParme model) {
+            return GZRobot.orderStatusReport(model);
+        }
+
+        /// <summary>
+        /// AGV 涓庝骇绾胯繘琛屽畨鍏ㄤ氦浜�+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("safetyInteraction")]
+        public ReturnResult SafetyInteraction(SafetyInteractionInfo model) {
+            return AgvService.SafetyInteraction(model);
+        }
+    }
+}
diff --git a/Controllers/ApiModel.cs b/Controllers/ApiModel.cs
new file mode 100644
index 0000000..6d2efda
--- /dev/null
+++ b/Controllers/ApiModel.cs
@@ -0,0 +1,232 @@
+锘縰sing System.Collections.Generic;
+
+namespace HH.WCS.Mobox3.AnGang.Controllers
+{
+    /// <summary>
+    /// 閫氱敤model
+    /// </summary>
+    public class ApiModel
+    {
+
+        #region mobox 鐩稿叧
+        /// <summary>
+        /// mobox 鍙栨秷浠诲姟銆佹爣璁板畬鎴愪换鍔�+        /// </summary>
+        public class MoboxTaskBase
+        {
+            public string TaskNo { get; set; }
+        }
+        /// <summary>
+        /// mobox 鎺ュ彛杩斿洖
+        /// </summary>
+        public class SimpleResult
+        {
+            public int resultCode { get; set; }
+            public string resultMsg { get; set; }
+            public List<object> result { get; set; } = new List<object>();
+        }
+
+        public class Result
+        {
+            public int resultCode { get; set; }
+            public string resultMsg { get; set; }
+        }
+
+        /// <summary>
+        /// 缁戝畾 鍙傛暟
+        /// </summary>
+        public class BindParme
+        {
+            /// <summary>
+            /// 鎵樼洏缂栫爜
+            /// </summary>
+            public string CntrCode { get; set; }
+            /// <summary>
+            /// 鎵樼洏绫诲瀷
+            /// </summary>
+            public string CntrType { get; set; }
+            /// <summary>
+            /// 璐т綅缂栫爜
+            /// </summary>
+            public string LocCode { get; set; }
+            /// <summary>
+            /// 鐗╂枡缂栫爜
+            /// </summary>
+            public string ItemCode { get; set; }
+            /// <summary>
+            /// 鐗╂枡鏁伴噺
+            /// </summary>
+            public int ItemQuantity { get; set; }
+        }
+
+        /// <summary>
+        /// 瑙g粦 鍙傛暟
+        /// </summary>
+        public class UnBindParme
+        {
+            /// <summary>
+            /// 鎵樼洏缂栫爜
+            /// </summary>
+            public string CntrCode { get; set; }
+
+        }
+
+        public class sendTask
+        {
+
+            /// <summary>
+            /// 璁㈠崟鍚�+            /// </summary>
+            public string ts { get; set; }
+        }
+
+        /// <summary>
+        /// 鏇存柊琛ヨ揣鐘舵�鍙傛暟
+        /// </summary>
+        public class replenishmentParme
+        {
+            /// <summary>
+            /// Y寮�浜哄伐琛ヨ揣杩涘叆浜ら�绠″埗,N琛ㄧず浜哄伐琛ヨ揣瀹屾垚鍙互寮�惎鑷姩杞繍
+            /// </summary>
+            public string stauts { get; set; }
+        }
+
+
+        public class orderStatusReportParme
+        {
+            /// <summary>
+            /// 璁㈠崟ID
+            /// </summary>
+            public int orderID { get; set; }
+            /// <summary>
+            /// 璁㈠崟鍚�+            /// </summary>
+            public string orderName { get; set; }
+            /// <summary>
+            /// 璁㈠崟鐘舵�
+            /// </summary>
+            public string orderStatus { get; set; }
+            /// <summary>
+            /// agv杞﹀彿鍒楄〃
+            /// </summary>
+            public string agvIDList { get; set; }
+            /// <summary>
+            /// 浼樺厛绾�+            /// </summary>
+            public string priority { get; set; }
+            /// <summary>
+            /// 璁㈠崟褰撳墠鐨勭洰鐨勫湴
+            /// </summary>
+            public string currentDes { get; set; }
+
+
+            /// <summary>
+            /// 褰撳墠鎸囦护
+            /// </summary>
+            public string currentCmd { get; set; }
+
+            /// <summary>
+            /// 閿欒鐮�+            /// </summary>
+            public int errorCode { get; set; }
+
+            /// <summary>
+            /// 璁㈠崟鐨勬埅鑷虫椂闂�+            /// </summary>
+            public string deadLine { get; set; }
+
+            /// <summary>
+            /// 璁㈠崟鐨勫垱寤烘椂闂�+            /// </summary>
+            public string createdTime { get; set; }
+
+            /// <summary>
+            /// 棰濆淇℃伅1
+            /// </summary>
+            public string extraInfo1 { get; set; }
+
+            /// <summary>
+            /// 棰濆淇℃伅2
+            /// </summary>
+            public string extraInfo2 { get; set; }
+        }
+
+        /// <summary>
+        /// 鍒嗘嫞纭
+        /// </summary>
+        public class SortingResultCheck
+        {
+            public string sortNo { get; set; }
+            public string cntrCode { get; set; }
+            public string itemCode { get; set; }
+            public float qty { get; set; }
+        }
+        public class CheckSortingWholeCntr
+        {
+            public string cntr { get; set; }
+            /// <summary>
+            /// 榛樿0锛�琛ㄧず鑷姩鐢熸垚鍒嗘嫞缁撴灉
+            /// </summary>
+            public int autoSort { get; set; }
+        }
+
+        /// <summary>
+        /// lua 璋冪敤鎺ュ彛锛岀爜鐩樹俊鎭�+        /// </summary>
+        public class PalletSorting
+        {
+            public string cntr_code { get; set; }
+            public string item_code { get; set; }
+            public float qty { get; set; }
+            public string arrival_no { get; set; }
+        }
+        public class PalletSorting1
+        {
+            public string cntr_code { get; set; }
+            public string bar_code { get; set; }
+            public string org { get; set; }
+            public float qty { get; set; }
+        }
+
+        public class ShippingOrderCheck
+        {
+            /// <summary>
+            /// 澶氫釜鍙戣揣鍗曞彿
+            /// </summary>
+            public string out_nos { get; set; }
+        }
+        public class SortingOrderCheck
+        {
+
+            public string s_no { get; set; }
+        }
+
+        public class ReturnResult1
+        {
+            public int code { get; set; }
+            public string msg { get; set; }
+
+        }
+
+        /// <summary>
+        /// 瀹夊叏浜や簰
+        /// </summary>
+        public class Interaction
+        {
+            public string station_name { get; set; }
+            public string apply_code { get; set; }
+            public int orderid { get; set; }
+
+        }
+        /// <summary>
+        /// 杩斿洖缁橤Z
+        /// </summary>
+        public class GzResult
+        {
+            public int resultCode { get; set; }
+            public string msg { get; set; }
+            public int orderID { get; set; }
+        }
+        #endregion
+    }
+}
diff --git a/Controllers/DebugController.cs b/Controllers/DebugController.cs
new file mode 100644
index 0000000..7dda76b
--- /dev/null
+++ b/Controllers/DebugController.cs
@@ -0,0 +1,288 @@
+锘縰sing System.Linq;
+using HH.WCS.Mobox3.AnGang.ServiceCore;
+using HH.WCS.Mobox3.AnGang.Devices;
+using HH.WCS.Mobox3.AnGang.Dispatch;
+using HH.WCS.Mobox3.AnGang.config;
+using HH.WCS.Mobox3.AnGang.Helper;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Web.Http;
+using static Opc.Ua.ContentFilter;
+using System.Threading.Tasks;
+
+using HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.Services;
+using static HH.WCS.Mobox3.AnGang.Dtos.Request.AgvRequest;
+using static HH.WCS.Mobox3.AnGang.Dtos.Response.AgvResponse;
+using HH.WCS.Mobox3.AnGang.Helpers;
+
+namespace HH.WCS.Mobox3.AnGang.Controllers
+{
+    /// <summary>
+    /// 娴嬭瘯鐢紝濡傛灉椤圭洰涓鍜岃澶囧鎺ワ紝鍓嶆湡璁惧鏃犳硶娴嬭瘯锛岀敤鎺ュ彛妯℃嫙
+    /// </summary>
+    [RoutePrefix("api")]
+    public class DebugController : System.Web.Http.ApiController
+    {
+        /// <summary>
+        /// AGV鐘舵�涓�敭鍥炴姤134562
+        /// </summary>
+        /// <param name="model">瀹瑰櫒鍙�/param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("AGVSeriesReports")]
+        public ReturnResults AGVSeriesReports(UpdateTaskState model)
+        {
+            var agvTaskState = new AgvTaskState()
+            {
+                task_no = model.TaskID,
+                forklift_no = model.ForkliftNo,
+                state = 1
+            };
+            ReturnResults returnResults = new ReturnResults();
+            returnResults.resultList = new List<ReturnResult>();
+
+            var temp1 =  AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp1);
+
+            agvTaskState.state = 3;
+            var temp3 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp3);
+
+            agvTaskState.state = 4;
+            var temp4 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp4);
+
+            agvTaskState.state = 5;
+            var temp5 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp5);
+
+            agvTaskState.state = 6;
+            var temp6 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp6);
+
+            agvTaskState.state = 2;
+            var temp2 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp2);
+
+            return returnResults;
+        }
+
+        /// <summary>
+        /// AGV鐘舵�涓�敭鍥炴姤134
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("AGVSeriesReportsPartA")]
+        public ReturnResults AGVSeriesReportsPartA(UpdateTaskState model) {
+            var agvTaskState = new AgvTaskState() {
+                task_no = model.TaskID,
+                forklift_no = model.ForkliftNo,
+                state = 1
+            };
+            ReturnResults returnResults = new ReturnResults();
+            returnResults.resultList = new List<ReturnResult>();
+
+            var temp1 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp1);
+
+            agvTaskState.state = 3;
+            var temp3 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp3);
+
+            agvTaskState.state = 4;
+            var temp4 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp4);
+
+            return returnResults;
+        }
+
+        /// <summary>
+        /// AGV鐘舵�涓�敭鍥炴姤562
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("AGVSeriesReportsPartB")]
+        public ReturnResults AGVSeriesReportsPartB(UpdateTaskState model) {
+            var agvTaskState = new AgvTaskState() {
+                task_no = model.TaskID,
+                forklift_no = model.ForkliftNo,
+                state = 4
+            };
+            ReturnResults returnResults = new ReturnResults();
+            returnResults.resultList = new List<ReturnResult>();
+
+            agvTaskState.state = 5;
+            var temp5 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp5);
+
+            agvTaskState.state = 6;
+            var temp6 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp6);
+
+            agvTaskState.state = 2;
+            var temp2 = AgvService.OperateAgvTaskStatus(agvTaskState);
+            returnResults.resultList.Add(temp2);
+
+            return returnResults;
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨暟鎹簱
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("BuildDB")]
+        public string BuildDB()
+        {
+            //bool res = false;
+            try
+            {
+                var db = DbHelper.GetDbClient();
+                //db.CodeFirst.InitTables<WCSTask>(); //鎵�湁搴撻兘鏀寔     
+                //db.CodeFirst.InitTables<Zone>();
+                //db.CodeFirst.InitTables<Area>();
+                //db.CodeFirst.InitTables<Location>();
+                //db.CodeFirst.InitTables<LocCntrRel>();
+                //db.CodeFirst.InitTables<Container>();
+                //db.CodeFirst.InitTables<TN_CG_Detail>();
+                //db.CodeFirst.InitTables<TN_WorkOrder>();
+                //db.CodeFirst.InitTables<TN_CAR_IN>();
+                //db.CodeFirst.InitTables<SYSHelper.OI_SYS_MAXID>();
+                //db.CodeFirst.InitTables<TN_Task_Action>();
+                //db.CodeFirst.InitTables<TN_Task>();
+                //db.CodeFirst.InitTables<TN_Location>();
+                //db.CodeFirst.InitTables<TN_Loc_Container>();
+
+                var locList = new List<TN_Location>();
+                //foreach (var area in Settings.Areas.Skip(1).ToList()) {
+                //    for (int i = 0; i < 8; i++) {
+                //        for (int j = 0; j < 30; j++) {
+                //            locList.Add(new TN_Location { S_SHELF_CODE = area, S_CODE = $"{area}-{i + 1}-{j + 1}", S_NAME = $"{area}璐ф灦 绗瑊i + 1}灞�绗瑊j + 1}鍙疯揣浣�, S_AGV_SITE = $"{area}-{i + 1}-{j + 1}", N_HEIGHT = i + 1 });
+                //        }
+                //    }
+                //}
+                locList.Add(new TN_Location { S_AREA_CODE = "B111", S_CODE = "B111-1-1", S_NAME = "B111-1-1", S_AGV_SITE = "B111-1-1"});
+                locList.Add(new TN_Location { S_AREA_CODE = "B111", S_CODE = "B111-4-1", S_NAME = "B111-4-1", S_AGV_SITE = "B111-4-1"});
+                locList.Add(new TN_Location { S_AREA_CODE = "B112", S_CODE = "B112-1-1", S_NAME = "B112-1-1", S_AGV_SITE = "B112-1-1"});
+
+                //locList.Add(new TN_Location { S_AREA_CODE = Settings.Areas[0], S_SHELF_CODE = Settings.Areas[0], S_CODE = Settings.Areas[0] + "-1", S_NAME = "鍙栨斁璐у尯-1", S_AGV_SITE = "P0-1"});
+                //locList.Add(new TN_Location { S_AREA_CODE = Settings.Areas[0], S_SHELF_CODE = Settings.Areas[0], S_CODE = Settings.Areas[0] + "-2", S_NAME = "鍙栨斁璐у尯-2", S_AGV_SITE = "P0-2"});
+                if (db.Insertable<TN_Location>(locList).ExecuteCommand() <= 0) {
+                    return "澶辫触";
+                }
+
+
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"鍙戠敓浜嗗紓甯�);
+                return "鍒濆鍖栨暟鎹簱閿欒" + ex.Message;
+            }
+            //return res ? "鎴愬姛" : "澶辫触";
+            return "鎴愬姛";
+        }
+
+        /// <summary>
+        /// 淇敼浠诲姟鐨勯噸閲忥紝渚夸簬娴嬭瘯
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("UpdateTaskWeight")]
+
+        public string UpdateTaskWeight(UpdateTaskWeightInfo model) {
+            var db = DbHelper.GetDbClient();
+            var task = db.Queryable<TN_Task>().First(a => a.S_CODE == model.TaskID);
+            if (task == null) {
+                return "浠诲姟鍙蜂笉瀛樺湪";
+            }
+            task.F_WEIGHT = model.Weight;
+
+            try {
+                using (var trans = db.Ado.UseTran()) {
+                    if (db.Updateable<TN_Task>(task).ExecuteCommand() > 0) {
+                        trans.CommitTran();
+                        return $"鎴愬姛 | 淇敼浠诲姟{task.S_CODE}閲嶉噺涓簕task.F_WEIGHT}";
+                    }
+                    else {
+                        trans.RollbackTran();
+                        return $"澶辫触 | 淇敼浠诲姟{task.S_CODE}閲嶉噺涓簕task.F_WEIGHT}";
+                    }
+                }
+            }
+            catch (Exception ex) {
+                return ex.Message;
+            }
+        }
+
+        [HttpPost]
+        public string AddCgCntrLocRel(CgInfo model) {
+            var db = DbHelper.GetDbClient();
+
+            try {
+                var loc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.LocId);
+                if (loc == null) {
+                    var locList = new List<TN_Location>();
+                    locList.Add(new TN_Location { S_CODE = model.LocId, N_CURRENT_NUM = 1 });
+                    if (db.Insertable<TN_Location>(locList).ExecuteCommand() <= 0) {
+                        return $"鎻掑叆浣嶇疆{model.LocId}澶辫触";
+                    }
+                }
+                if (loc.N_CURRENT_NUM == 0) {
+                    loc.N_CURRENT_NUM = 1;
+                    if (db.Updateable<TN_Location>(loc).UpdateColumns(it => new { it.N_CURRENT_NUM, it.T_MODIFY }).ExecuteCommand() <= 0) {
+                        return $"淇敼浣嶇疆{model.LocId}澶辫触";
+                    }
+                }
+
+                var locCntrRel = db.Queryable<TN_Loc_Container>().First(a => a.S_LOC_CODE == model.LocId && a.S_CNTR_CODE == model.CntId);
+                if (loc == null) {
+                    var locList = new List<TN_Loc_Container>();
+                    locList.Add(new TN_Loc_Container { S_LOC_CODE = model.LocId, S_CNTR_CODE = model.CntId });
+                    if (db.Insertable<TN_Loc_Container>(locList).ExecuteCommand() <= 0) {
+                        return $"鎻掑叆浣嶇疆鎵樼洏鍏崇郴{model.LocId}-{model.CntId}澶辫触";
+                    }
+                }
+
+                var cgDetail = db.Queryable<TN_CG_Detail>().First(a => a.S_CNTR_CODE == model.CntId && a.S_CG_ID == model.CgId);
+                if (cgDetail == null) {
+                    var locList = new List<TN_CG_Detail>();
+                    locList.Add(new TN_CG_Detail { S_CNTR_CODE = model.CntId, S_CG_ID = model.CntId });
+                    if (db.Insertable<TN_CG_Detail>(locList).ExecuteCommand() <= 0) {
+                        return $"鎻掑叆鎵樼洏鐗╂枡鍏崇郴{model.CntId}-{model.CgId}澶辫触";
+                    }
+                }
+            }
+            catch (Exception ex) {
+                return $"鍑洪敊锛歿ex}";
+            }
+
+            return "success";
+        }
+    }
+
+    public class CgInfo {
+        public string CgId { get; set; }
+        public string CntId { get; set; }
+        public string LocId { get; set; }
+    }
+
+    public class UpdateTaskState
+    {
+        public string TaskID { set; get; } // 浠诲姟ID
+        public string ForkliftNo { set; get; } // AGV 灏忚溅鍙�+    }
+
+    public class UpdateTaskWeightInfo {
+        public string TaskID { set; get; }
+        public float Weight { set; get; }
+    }
+
+    public class ReturnResults
+    {
+        public List<ReturnResult> resultList { set; get; }
+    }
+}
diff --git a/Controllers/ErpController.cs b/Controllers/ErpController.cs
new file mode 100644
index 0000000..f09ea57
--- /dev/null
+++ b/Controllers/ErpController.cs
@@ -0,0 +1,19 @@
+锘縰sing System;
+using HH.WCS.Mobox3.AnGang.config;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Web.Http;
+
+using static HH.WCS.Mobox3.AnGang.Controllers.ApiModel;
+
+namespace HH.WCS.Mobox3.AnGang.Controllers {
+    /// <summary>
+    /// ERP 璋冪敤鐨勬帴鍙�+    /// </summary>
+    [RoutePrefix("api")]
+    public class ErpController : ApiController {
+
+
+
+    }
+}
\ No newline at end of file
diff --git a/Controllers/MoboxController.cs b/Controllers/MoboxController.cs
new file mode 100644
index 0000000..142de27
--- /dev/null
+++ b/Controllers/MoboxController.cs
@@ -0,0 +1,83 @@
+锘縰sing Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Web.Http;
+
+using HH.WCS.Mobox3.AnGang.Services;
+using static HH.WCS.Mobox3.AnGang.Dtos.Request.MoboxRequest;
+using static HH.WCS.Mobox3.AnGang.Dtos.Response.MoboxResponse;
+
+namespace HH.WCS.Mobox3.AnGang.Controllers 
+{
+    /// <summary>
+    /// Mobox3 璋冪敤锛岃剼鏈腑璋冪敤
+    /// </summary>
+    [RoutePrefix("api")]
+    public class MoboxController : ApiController {
+        /// <summary>
+        /// 璐у搧鍏ュ簱(PDA)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("InWarehouse")]
+        public SimpleResult InWarehouse(InWarehouseInfo model) {
+            return MoboxService.InWarehouse(model);
+        }
+
+        /// <summary>
+        /// PDA閫夋嫨缁堢偣璐т綅
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("SelectLocation")]
+        public SimpleResult SelectLocation(SelectLocationInfo model) {
+            return MoboxService.SelectLocation(model);
+        }
+
+        /// <summary>
+        /// 浜у搧閮ㄥ垎鍑哄簱(WMS)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("PartOutWarehouse")]
+        public SimpleResult PartOutWarehouse(PartOutWarehouseInfo model) {
+            return MoboxService.PartOutWarehouse(model);
+        }
+
+        /// <summary>
+        /// 浜у搧閮ㄥ垎鍥炲簱(WMS)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("PartInWarehouse")]
+        public SimpleResult PartInWarehouse(PartInWarehouseInfo model) {
+            return MoboxService.PartInWarehouse(model);
+        }
+
+        /// <summary>
+        /// 鐩樼偣鐞嗚揣鍑哄簱(WMS)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("CheckOutWarehouse")]
+        public SimpleResult CheckOutWarehouse(CheckOutWarehouseInfo model) {
+            return MoboxService.CheckOutWarehouse(model);
+        }
+
+        /// <summary>
+        /// 鐩樼偣鐞嗚揣鍥炲簱(WMS)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("CheckInWarehouse")]
+        public SimpleResult CheckInWarehouse(CheckInWarehouseInfo model) {
+            return MoboxService.CheckInWarehouse(model);
+        }
+    }
+}
diff --git a/Controllers/WmsController.cs b/Controllers/WmsController.cs
new file mode 100644
index 0000000..56908dc
--- /dev/null
+++ b/Controllers/WmsController.cs
@@ -0,0 +1,18 @@
+锘�+using HH.WCS.Mobox3.AnGang.config;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Web.Http;
+using static HH.WCS.Mobox3.AnGang.Controllers.ApiModel;
+
+namespace HH.WCS.Mobox3.AnGang.Controllers
+{
+    /// <summary>
+    /// 绗笁鏂硅皟鐢ㄧ殑鎺ュ彛
+    /// </summary>
+    [RoutePrefix("api")]
+    public class WmsController : System.Web.Http.ApiController
+    {
+        
+    }
+}
diff --git a/Devices/ModbusHelper.cs b/Devices/ModbusHelper.cs
new file mode 100644
index 0000000..ad4675e
--- /dev/null
+++ b/Devices/ModbusHelper.cs
@@ -0,0 +1,450 @@
+锘縰sing EasyModbus;
+using HH.WCS.Mobox3.AnGang;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Helpers
+{
+    /// <summary>
+    /// modbus tcp 鐢ㄧ涓夋柟鐨勫寘
+    /// </summary>
+    public class ModbusHelper
+    {
+        //鍐呭瓨锛岃繛鎺ヤ笂鐨刴ocbus閫氳瀵硅薄
+        public static Dictionary<string, ModbusClient> ipPort_ModbusClient = new Dictionary<string, ModbusClient>();
+
+        public ModbusHelper(string ip, int port)
+        {
+            Init(new ModbusConfigModel() { Ip = ip, Port = port });
+        }
+
+        /// <summary>
+        /// modbus鍚姩鍒濆鍖�+        /// </summary>
+        public static void Init(ModbusConfigModel modbusConfigModel)
+        {
+            //閰嶇疆鏂囦欢璇诲彇鎵�湁鐨刴ocbus杩涜鍒濆鍖�+            try
+            {
+                if (modbusConfigModel == null)
+                {
+                    //璇诲彇閰嶇疆淇℃伅澶辫触
+                    LogHelper.Info("Modbus锛氳鍙栭厤缃俊鎭け璐�);
+                    return;
+                }
+
+                var modbusClient = new ModbusClient(modbusConfigModel.Ip, modbusConfigModel.Port);
+                ipPort_ModbusClient.Add($"{modbusConfigModel.Ip}:{modbusConfigModel.Port}", modbusClient);
+                Link(modbusClient);
+            }
+            catch (Exception ex)
+            {
+
+            }
+        }
+
+        /// <summary>
+        /// 閲嶈繛
+        /// </summary>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        public static void Relink() {
+            try {
+                if (ipPort_ModbusClient.Count == 0) {
+                    return;
+                }
+
+                foreach (var item in ipPort_ModbusClient) {
+                    if (!item.Value.Connected) {
+                        Link(item.Value);
+                    }
+                }
+            }
+            catch (Exception ex) {
+
+            }
+        }
+
+        /// <summary>
+        /// 杩炴帴modbus涓嬩綅鏈�+        /// </summary>
+        /// <param name="modbusClient"></param>
+        private static void Link(ModbusClient modbusClient)
+        {
+            try
+            {
+                modbusClient.Disconnect();
+                modbusClient.Connect();
+                if (modbusClient.Connected)
+                {
+                    //杩炴帴涓�+                }
+                else
+                {
+                    //娌¤繛涓�+                }
+            }
+            catch (Exception ex)
+            {
+
+            }
+        }
+
+        /// <summary>
+        /// 閲嶈繛
+        /// </summary>
+        internal static void RestLink()
+        {
+            if (ipPort_ModbusClient.Count > 0)
+            {
+                foreach (var item in ipPort_ModbusClient)
+                {
+                    if (!item.Value.Connected)
+                    {
+                        Link(item.Value);
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// 璇讳竴涓垨澶氫釜绾垮湀锛岃繑鍥炰竴涓猙it bool鏁扮粍
+        /// </summary>
+        /// <param name="address"></param>
+        /// <param name="qty"></param>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        /// <returns></returns>
+        public static bool[] ReadCoils(int address, int qty, string ip, int port = 502)
+        {
+            bool[] res = new bool[0];
+            var client = GetModbusClient(ip, port);
+            if (client != null && client.Connected)
+            {
+                try
+                {
+                    res = client.ReadCoils(address, qty);
+                    if (res.Length != 0)
+                    {
+                        //璇诲彇鎴愬姛
+                    }
+                    else
+                    {
+                        //璇诲彇澶辫触
+                    }
+                }
+                catch (Exception ex)
+                {
+
+                }
+            }
+            else
+            {
+
+            }
+            return res;
+        }
+
+        /// <summary>
+        /// 鍐欏叆鍗曚釜绾垮湀
+        /// </summary>
+        /// <param name="address"></param>
+        /// <param name="value"></param>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        public static bool WriteSingleCoil(int address, bool value, string ip, int port = 502)
+        {
+            var res = false;
+            var client = GetModbusClient(ip, port);
+            if (client != null && client.Connected)
+            {
+                try
+                {
+                    client.WriteSingleCoil(address, value);
+                    res = value == client.ReadCoils(address, 1)[0];
+                    if (res)
+                    {
+                        //鍐欏叆鎴愬姛
+                    }
+                    else
+                    {
+                        //鍐欏叆澶辫触
+                    }
+                }
+                catch (Exception ex)
+                {
+
+                }
+            }
+            else
+            {
+
+            }
+            return res;
+        }
+        /// <summary>
+        /// 鍐欏叆澶氫釜绾垮湀
+        /// </summary>
+        /// <param name="address"></param>
+        /// <param name="values"></param>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        public static bool WriteMultipleCoils(int address, bool[] values, string ip, int port = 502)
+        {
+            var res = false;
+            var client = GetModbusClient(ip, port);
+            if (client != null && client.Connected)
+            {
+                try
+                {
+                    client.WriteMultipleCoils(address, values);
+                    var dataRead = client.ReadCoils(address, values.Length);
+                    res = values.SequenceEqual(dataRead);
+                    if (res)
+                    {
+                        //鍐欏叆鎴愬姛
+                    }
+                    else
+                    {
+                        //鍐欏叆澶辫触
+                    }
+                }
+                catch (Exception ex)
+                {
+
+                }
+            }
+            else
+            {
+
+            }
+            return res;
+
+        }
+
+        /// <summary>
+        /// 鎵归噺璇诲彇鎴栧崟鐙鍙栦繚鎸佸瘎瀛樺櫒锛岃繑鍥炵殑鏄�2浣峣nt鏁扮粍
+        /// </summary>
+        /// <param name="address">璇诲彇璧峰浣�/param>
+        /// <param name="qty">璇诲彇鐨勬暟閲�/param>
+        /// <param name="ip">IP鍦板潃</param>
+        /// <param name="port">绔彛鍙�/param>
+        /// <returns></returns>
+        public static int[] ReadHoldingRegisters(int address, int qty, string ip, int port = 502)
+        {
+            int[] res = new int[0];
+            var client = GetModbusClient(ip, port);
+            if (client != null && client.Connected)
+            {
+                try
+                {
+                    //涓�釜瀵勫瓨鍣ㄦ槸16浣嶏紝杩斿洖2涓猧nt绫诲瀷
+                    res = client.ReadHoldingRegisters(address, qty);
+                    if (res.Length != 0)
+                    {
+                        //璇诲彇鎴愬姛
+                    }
+                    else
+                    {
+                        //璇诲彇澶辫触
+                    }
+                }
+                catch (Exception ex)
+                {
+                    //濡傛灉璇锋眰鏁伴噺瓒呭嚭淇濇寔瀵勫瓨鍣ㄧ殑鏈�ぇ鏁版嵁琛屾暟锛屼細鎶ラ敊
+                    LogHelper.Info($"鍙戠敓浜嗗紓甯�{ex.Message},IP:{ip},Port:{port}", "Error");
+                }
+            }
+            else
+            {
+                LogHelper.Info($"鏈壘鍒癕odbus璁惧瀹炰緥瀵硅薄:IP:{ip},Port:{port}");
+            }
+            return res;
+        }
+
+        /// <summary>
+        /// 鍐欏叆鍗曚釜瀵勫瓨鍣ㄦ暟鎹�+        /// </summary>
+        /// <param name="address"></param>
+        /// <param name="value"></param>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        public static bool WriteSingleRegister(int address, int value, string ip, int port = 502)
+        {
+            var res = false;
+            var client = GetModbusClient(ip, port);
+            if (client != null && client.Connected)
+            {
+                try
+                {
+                    client.WriteSingleRegister(address, value);
+                    res = value == client.ReadHoldingRegisters(address, 1)[0];
+                    if (res)
+                    {
+                        //鍐欏叆鎴愬姛
+                    }
+                    else
+                    {
+                        //鍐欏叆澶辫触
+                    }
+                }
+                catch (Exception ex)
+                {
+
+                }
+            }
+            else
+            {
+
+            }
+            return res;
+        }
+
+        /// <summary>
+        /// 鍐欏叆澶氫釜瀵勫瓨鍣ㄦ暟鎹�+        /// </summary>
+        /// <param name="address"></param>
+        /// <param name="values"></param>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        public static bool WriteMultipleRegisters(int address, int[] values, string ip, int port = 502)
+        {
+            var res = false;
+            var client = GetModbusClient(ip, port);
+            var log = string.Join(",", values.Select(x => x.ToString()));
+            if (client != null && client.Connected)
+            {
+                try
+                {
+                    client.WriteMultipleRegisters(address, values);
+                    var dataRead = client.ReadHoldingRegisters(address, values.Length);
+                    res = values.SequenceEqual(dataRead);
+                    if (res)
+                    {
+                        LogHelper.Info($"鍐欏叆鎴愬姛,IP:{ip},Port:{port},{log}");
+                    }
+                    else
+                    {
+                        LogHelper.Info($"鍐欏叆澶辫触,IP:{ip},Port:{port},{log}");
+                    }
+                }
+                catch (Exception ex)
+                {
+                    LogHelper.Info($"鍙戠敓浜嗗紓甯�{ex.Message},IP:{ip},Port:{port},{log}","Error");
+                }
+            }
+            else
+            {
+                LogHelper.Info($"鏈厤缃殑璁惧淇℃伅,IP:{ip},Port:{port},{log}");
+            }
+            return res;
+        }
+
+        /// <summary>
+        /// 璇讳竴涓垨澶氫釜绂绘暎杈撳叆锛岃繑鍥炰竴涓猙it鐪熷亣鏁扮粍
+        /// </summary>
+        /// <param name="address"></param>
+        /// <param name="qty"></param>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        /// <returns></returns>
+        public static bool[] ReadDiscreteInputs(int address, int qty, string ip, int port = 502)
+        {
+            bool[] res = new bool[0];
+            var client = GetModbusClient(ip, port);
+            if (client != null && client.Connected)
+            {
+                try
+                {
+                    res = client.ReadDiscreteInputs(address, qty);
+                    if (res.Length != 0)
+                    {
+                        //璇诲彇鎴愬姛
+                    }
+                    else
+                    {
+                        //璇诲彇澶辫触
+                    }
+                }
+                catch (Exception ex)
+                {
+
+                }
+            }
+            else
+            {
+
+            }
+            return res;
+
+        }
+
+        /// <summary>
+        /// 璇讳竴涓垨澶氫釜杈撳叆瀵勫瓨鍣紝杩斿洖涓�釜int32浣嶆暟缁�+        /// </summary>
+        /// <param name="address"></param>
+        /// <param name="qty"></param>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        /// <returns></returns>
+        public static int[] ReadInputRegisters(int address, int qty, string ip, int port = 502)
+        {
+            int[] res = new int[0];
+            var client = GetModbusClient(ip, port);
+            if (client != null && client.Connected)
+            {
+                try
+                {
+                    res = client.ReadInputRegisters(address, qty);
+                    if (res.Length != 0)
+                    {
+                        //璇诲彇鎴愬姛
+                    }
+                    else
+                    {
+                        //璇诲彇澶辫触
+                    }
+                }
+                catch (Exception ex)
+                {
+
+                }
+            }
+            else
+            {
+
+            }
+            return res;
+        }
+
+        /// <summary>
+        /// 鑾峰彇modbus閫氳瀵硅薄
+        /// </summary>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        /// <returns></returns>
+        private static ModbusClient GetModbusClient(string ip, int port)
+        {
+            if (ipPort_ModbusClient.ContainsKey($"{ip}:{port}"))
+            {
+                return ipPort_ModbusClient[$"{ip}:{port}"];
+            }
+            else
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// 閫氳繃Modbus鍗忚杩炴帴涓嬩綅鏈烘椂闇�鐨刴odel锛屽簲璇ユ斁鍦╩odel灞傦紝杩欓噷鎴戞噿浜�+        /// </summary>
+        public class ModbusConfigModel
+        {
+            public string Ip { set; get; }//IP鍦板潃
+            public int Port { set; get; }//绔彛鍙�+        }
+    }
+}
diff --git a/Devices/OpcUaHelper.cs b/Devices/OpcUaHelper.cs
new file mode 100644
index 0000000..1032aa3
--- /dev/null
+++ b/Devices/OpcUaHelper.cs
@@ -0,0 +1,192 @@
+锘縰sing Opc.Ua.Client;
+using Opc.Ua;
+using System;
+using Opc.Ua.Configuration;
+
+namespace HH.WCS.Mobox3.AnGang.Devices
+{
+    internal class OpcUaHelper
+    {
+        private static Opc.Ua.Client.Session session;
+
+        static OpcUaHelper()
+        {
+            CreateUpcSession();
+        }
+
+        /// <summary>
+        /// 杩炴帴OPC鏈嶅姟
+        /// </summary>
+        internal static async void CreateUpcSession()
+        {
+            try
+            {
+                // 鍒涘缓涓�釜搴旂敤閰嶇疆瀵硅薄锛岀敤浜庤缃簲鐢ㄥ悕绉般�鍞竴鏍囪瘑銆佺被鍨嬨�璇佷功鍜屽畨鍏ㄧ瓥鐣�+                var config = new ApplicationConfiguration()
+                {
+                    ApplicationName = "MyClient",
+                    ApplicationUri = Utils.Format(@"urn:{0}:MyClient", System.Net.Dns.GetHostName()),
+                    ApplicationType = ApplicationType.Client,
+                    SecurityConfiguration = new SecurityConfiguration
+                    {
+                        ApplicationCertificate = new CertificateIdentifier { StoreType = @"Directory", StorePath = @"%CommonApplicationData%\OPC Foundation\CertificateStores\MachineDefault", SubjectName = "MyClientSubjectName" },
+                        TrustedIssuerCertificates = new CertificateTrustList { StoreType = @"Directory", StorePath = @"%CommonApplicationData%\OPC Foundation\CertificateStores\UA Certificate Authorities" },
+                        TrustedPeerCertificates = new CertificateTrustList { StoreType = @"Directory", StorePath = @"%CommonApplicationData%\OPC Foundation\CertificateStores\UA Applications" },
+                        RejectedCertificateStore = new CertificateTrustList { StoreType = @"Directory", StorePath = @"%CommonApplicationData%\OPC Foundation\CertificateStores\RejectedCertificates" },
+                        AutoAcceptUntrustedCertificates = true,
+                        RejectSHA1SignedCertificates = false,
+                        MinimumCertificateKeySize = 1024,
+                        NonceLength = 32,
+                    },
+                    TransportConfigurations = new TransportConfigurationCollection(),
+                    TransportQuotas = new TransportQuotas { OperationTimeout = 15000 },
+                    ClientConfiguration = new ClientConfiguration { DefaultSessionTimeout = 60000 },
+                    TraceConfiguration = new TraceConfiguration()
+                };
+
+                // 楠岃瘉搴旂敤閰嶇疆瀵硅薄
+                await config.Validate(ApplicationType.Client);
+
+                // 璁剧疆璇佷功楠岃瘉浜嬩欢锛岀敤浜庤嚜鍔ㄦ帴鍙椾笉鍙椾俊浠荤殑璇佷功
+                if (config.SecurityConfiguration.AutoAcceptUntrustedCertificates)
+                {
+                    config.CertificateValidator.CertificateValidation += (s, e) => { e.Accept = (e.Error.StatusCode == StatusCodes.BadCertificateUntrusted); };
+                }
+
+                // 鍒涘缓涓�釜搴旂敤瀹炰緥瀵硅薄锛岀敤浜庢鏌ヨ瘉涔�+                var application = new ApplicationInstance(config);
+
+                // 妫�煡搴旂敤瀹炰緥瀵硅薄鐨勮瘉涔�+                bool check = await application.CheckApplicationInstanceCertificate(false, 2048);
+                // 鍒涘缓涓�釜浼氳瘽瀵硅薄锛岀敤浜庤繛鎺ュ埌 OPC UA 鏈嶅姟鍣�+                EndpointDescription endpointDescription = CoreClientUtils.SelectEndpoint("opc.tcp://172.16.57.41:4840", true);
+                EndpointConfiguration endpointConfiguration = EndpointConfiguration.Create(config);
+                ConfiguredEndpoint endpoint = new ConfiguredEndpoint(null, endpointDescription, endpointConfiguration);
+                session = await Session.Create(config, endpoint, false, false, "DataCollector", 60000, new UserIdentity(), null);
+                if (session != null && session.Connected)
+                {
+                    Console.WriteLine("The session is connected to the OPC UA server.");
+                    LogHelper.Info($"鍒涘缓OPC杩炴帴鎴愬姛", "OPC");
+                }
+                else
+                {
+                    Console.WriteLine("The session is not connected to the OPC UA server.");
+                    LogHelper.Info($"鍒涘缓OPC杩炴帴澶辫触", "OPC");
+                }
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"杩炴帴OPC鏈嶅姟寮傚父" + e.Message, "OPC");
+            }
+        }
+
+        /// <summary>
+        /// 璇诲彇OPC鑺傜偣鏁版嵁
+        /// </summary>
+        /// <param name="nodeId"></param>
+        internal static object ReadOpcValue(string nodeId)
+        {
+            try
+            {
+                if (session != null && session.Connected)
+                {
+                    // 璇诲彇鏁版嵁鑺傜偣
+                    DataValue item = session.ReadValue(nodeId: nodeId);
+                    LogHelper.Info($"OPC璇诲彇:nodeid:{nodeId},value:{item.Value}", "OPC");
+                    return item.Value;
+                }
+                else
+                {
+                    Console.WriteLine("The session is not connected to the OPC UA server.");
+                    LogHelper.Info($"OPC杩炴帴澶辫触", "OPC");
+                    CreateUpcSession();
+                }
+               
+            }
+            catch (Exception e)
+            {
+
+                LogHelper.Info($"璇诲彇OPC鏁版嵁寮傚父" + e.Message, "OPC");
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// 鍐橭PC鑺傜偣鏁版嵁
+        /// </summary>
+        /// <param name="nodeId"></param>
+        /// <param name="val"></param>
+        internal static void WriteOpcValue(string nodeId,bool val)
+        {
+            try
+            {
+                if (session != null && session.Connected)
+                {
+                    // 鍐欏叆鏁版嵁鍒拌妭鐐�+                    WriteValue writeValue = new WriteValue
+                    {
+                        NodeId = new NodeId(nodeId),
+                        AttributeId = Attributes.Value,
+                        Value = new DataValue(val)
+                    };
+
+                    StatusCodeCollection results;
+                    DiagnosticInfoCollection diagnosticInfos;
+                    session.Write(null, new WriteValueCollection { writeValue }, out results, out diagnosticInfos);
+                    Console.WriteLine($"Write Status for {nodeId}: {results[0]}");
+                    LogHelper.Info($"OPC鍐欏叆:nodeid:{nodeId},value:{val}", "OPC");
+                }
+                else
+                {
+                    Console.WriteLine("The session is not connected to the OPC UA server.");
+                    LogHelper.Info($"OPC杩炴帴澶辫触", "OPC");
+                    CreateUpcSession();
+                }
+
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"鍐欏叆OPC鏁版嵁寮傚父" + e.Message, "OPC");
+            }
+        }
+
+        /// <summary>
+        /// 鍐橭PC鑺傜偣鏁版嵁
+        /// </summary>
+        /// <param name="nodeId"></param>
+        /// <param name="val"></param>
+        internal static void WriteOpcValue(string nodeId, int val)
+        {
+            try
+            {
+                if (session != null && session.Connected)
+                {
+                    // 鍐欏叆鏁版嵁鍒拌妭鐐�+                    WriteValue writeValue = new WriteValue
+                    {
+                        NodeId = new NodeId(nodeId),
+                        AttributeId = Attributes.Value,
+                        Value = new DataValue(val)
+                    };
+
+                    StatusCodeCollection results;
+                    DiagnosticInfoCollection diagnosticInfos;
+                    session.Write(null, new WriteValueCollection { writeValue }, out results, out diagnosticInfos);
+                    Console.WriteLine($"Write Status for {nodeId}: {results[0]}");
+                    LogHelper.Info($"OPC鍐欏叆:nodeid:{nodeId},value:{val}", "OPC");
+                }
+                else
+                {
+                    Console.WriteLine("The session is not connected to the OPC UA server.");
+                    LogHelper.Info($"OPC杩炴帴澶辫触", "OPC");
+                    CreateUpcSession();
+                }
+
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"鍐欏叆OPC鏁版嵁寮傚父" + e.Message, "OPC");
+            }
+        }
+    }
+}
diff --git a/Devices/PlcHelper.cs b/Devices/PlcHelper.cs
new file mode 100644
index 0000000..7a502e9
--- /dev/null
+++ b/Devices/PlcHelper.cs
@@ -0,0 +1,99 @@
+锘縰sing HH.WCS.Mobox3.AnGang.process;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Devices
+{
+    internal class PlcHelper
+    {
+        internal static void Receive(string ip, string msg) {
+            //澶勭悊璁惧淇″彿
+            DeviceProcess.Analysis(msg, ip);
+        }
+        internal static bool SendHex(string ip, string msg) {
+            return TcpServer.TcpServerSend(ip, Hex2Bytes(msg));
+
+        }
+        internal static void SendAscii(string ip, string msg) {
+            TcpServer.TcpServerSend(ip, Encoding.ASCII.GetBytes(msg));
+        }
+
+        internal static byte[] Hex2Bytes(string hexString) {
+            hexString = hexString.Replace(" ", "");
+            if ((hexString.Length % 2) != 0)
+                hexString += " ";
+            byte[] returnBytes = new byte[hexString.Length / 2];
+            for (int i = 0; i < returnBytes.Length; i++)
+                returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
+
+            return returnBytes;
+        }
+        internal static string Hex2Ascii(string hexString) {
+            hexString = hexString.Replace(" ", "");
+            if ((hexString.Length % 2) != 0)
+                hexString += " ";
+            byte[] returnBytes = new byte[hexString.Length / 2];
+            for (int i = 0; i < returnBytes.Length; i++)
+                returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
+
+            return Encoding.ASCII.GetString(returnBytes);
+        }
+
+        #region 杩涘埗杞崲+CRC
+        internal static bool CheckCRC(string hex) {
+            var result = false;
+            var data = hex.Replace(" ", "");
+            if (data.Length % 2 == 0) {
+                var code1 = data.Substring(data.Length - 4, 4).ToLower();
+                var code2 = BitConverter.ToString(CRC16LH(Hex2Bytes(data.Substring(0, data.Length - 4)))).Replace("-", "").Replace(" ", "").ToLower();
+                result = code1 == code2;
+            }
+            return result;
+        }
+        internal static byte[] CRC16LH(byte[] pDataBytes) {
+            ushort crc = 0xffff;
+            ushort polynom = 0xA001;
+
+            for (int i = 0; i < pDataBytes.Length; i++) {
+                crc ^= pDataBytes[i];
+                for (int j = 0; j < 8; j++) {
+                    if ((crc & 0x01) == 0x01) {
+                        crc >>= 1;
+                        crc ^= polynom;
+                    }
+                    else {
+                        crc >>= 1;
+                    }
+                }
+            }
+
+            byte[] result = BitConverter.GetBytes(crc);
+            return result;
+        }
+        internal static byte[] CRC16HL(byte[] pDataBytes) {
+            ushort crc = 0xffff;
+            ushort polynom = 0xA001;
+
+            for (int i = 0; i < pDataBytes.Length; i++) {
+                crc ^= pDataBytes[i];
+                for (int j = 0; j < 8; j++) {
+                    if ((crc & 0x01) == 0x01) {
+                        crc >>= 1;
+                        crc ^= polynom;
+                    }
+                    else {
+                        crc >>= 1;
+                    }
+                }
+            }
+
+            byte[] result = BitConverter.GetBytes(crc).Reverse().ToArray();
+            return result;
+        }
+
+        #endregion
+    }
+}
diff --git a/Devices/S7Helper.cs b/Devices/S7Helper.cs
new file mode 100644
index 0000000..c9c9931
--- /dev/null
+++ b/Devices/S7Helper.cs
@@ -0,0 +1,423 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Controllers;
+using Newtonsoft.Json.Linq;
+using S7.Net;
+using S7.Net.Types;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Web.Services.Description;
+
+namespace HH.WCS.Mobox3.AnGang.Devices
+{
+
+    /// <summary>
+    /// 瑗块棬瀛恜lc
+    /// </summary>
+    public class S7Helper
+    {
+        public static Dictionary<string, Plc> ip_Plc = new Dictionary<string, Plc>();//鍐呭瓨锛岃繛鎺ヤ笂鐨凱LC閫氳瀵硅薄
+
+        public S7Helper(string ip, short rack, short slot)
+        {
+            Init(new S7ConfigModel() { Ip = ip, Rack = rack, Slot = slot, CpuType = CpuType.S71500 });
+        }
+
+        /// <summary>
+        /// S7鍚姩鍒濆鍖�+        /// </summary>
+        public static void Init(S7ConfigModel s7ConfigInfo)
+        {
+            //閰嶇疆鏂囦欢璇诲彇鎵�湁鐨刾lc杩涜鍒濆鍖�+            try
+            {
+                if (s7ConfigInfo == null)
+                {
+                    //璇诲彇閰嶇疆淇℃伅澶辫触
+                    return;
+                }
+
+                var plc = new Plc(s7ConfigInfo.CpuType, s7ConfigInfo.Ip, s7ConfigInfo.Rack, s7ConfigInfo.Slot);
+                ip_Plc.Add(s7ConfigInfo.Ip, plc);
+                Link(plc);
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"{ex.Message}\r\n{ex.StackTrace}");
+            }
+        }
+
+        /// <summary>
+        /// 閲嶈繛
+        /// </summary>
+        public static void RestLink()
+        {
+            if (ip_Plc.Count>0)
+            {
+                foreach (var item in ip_Plc)
+                {
+                    if(!item.Value.IsConnected)
+                    {
+                        Link(item.Value);
+                    }
+                }
+            }
+        }
+
+
+        /// <summary>
+        /// 杩炴帴PLC
+        /// </summary>
+        /// <param name="plc"></param>
+        private static void Link(Plc plc)
+        {
+            try
+            {
+                plc.Close();
+                plc.Open();
+                if (plc.IsConnected)
+                {
+                    LogHelper.Info($"杩炴帴涓妠plc.IP}");//杩炴帴涓�+                }
+                else
+                {
+                    LogHelper.Info($"娌¤繛涓妠plc.IP}");//娌¤繛涓�+                }
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"{ex.Message}\r\n{ex.StackTrace}");
+            }
+        }
+
+        /// <summary>
+        /// 鎵归噺璇诲彇鎴栧崟鐙鍙朌B鍧楁暟鎹紙8浣峛yte锛夛紝骞惰浆鎹㈡垚瀛楃涓插舰寮�+        /// </summary>
+        /// <param name="deviceIp">plc璁惧閫氳鍦板潃</param>
+        /// <param name="dbNo">DB鍧楀彿</param>
+        /// <param name="startByteAdr">璧峰byte鍦板潃锛屾渶灏忓�0锛�=8浣�1涓狟lock</param>
+        /// <param name="count">璇诲彇鐨勪釜鏁帮紝1涓�8浣嶅崄鍏繘鍒舵暟</param>
+        /// <returns></returns>
+        public static string ReadString(string deviceIp, int dbNo, int startByteAdr, int count)
+        {
+            string result = "";
+            try
+            {
+                var plc = GetPlc(deviceIp);
+                if (plc != null)
+                {
+                    if (plc.IsConnected)
+                    {
+                        var data = plc.ReadBytes(DataType.DataBlock, dbNo, startByteAdr, count);
+                        result = System.Text.Encoding.UTF8.GetString(data).TrimEnd('\0').TrimEnd('\n').TrimEnd('\r'); ;//姝ゆ柟娉曞彲浠ユ妸byte鏁扮粍杞崲鎴愬瓧绗︿覆锛屼絾鏄細閫犳垚\0\u缁撴潫绗︿笉鏄剧ず锛岄渶瑕佷笅浣嶆満姝g‘鐨勬暟鎹�+                        if (result == string.Empty)
+                        {
+                            Link(plc);//璁惧鍙戦�鐨勬暟鎹负绌猴紝閲嶈繛
+                        }
+                    }
+                    else
+                    {
+                        Link(plc);//璁惧鏈繛鎺ワ紝閲嶈繛
+                    }
+                }
+                else
+                {
+                    LogHelper.Info($"涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�");//涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�
+                }
+
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"{ex.Message}\r\n{ex.StackTrace}");
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 鎵归噺鍐欏叆鎴栧崟鐙啓鍏B鍧楁暟鎹紙8浣峛yte锛夛紝浠ュ瓧绗︿覆杞崲byte褰㈠紡鍐欏叆
+        /// </summary>
+        /// <param name="deviceIp">plc璁惧閫氳鍦板潃</param>
+        /// <param name="dbNo">DB鍧楀彿</param>
+        /// <param name="startByteAdr">璧峰byte鍦板潃锛屾渶灏忓�0锛�=8浣�1涓狟lock</param>
+        /// <param name="data">瑕佸啓鍏ョ殑鏁版嵁</param>
+        /// <returns></returns>
+        public static bool WriteString(string deviceIp, int dbNo, int startByteAdr, string data)
+        {
+            var result = false;
+            try
+            {
+                var plc = GetPlc(deviceIp);
+                if (plc != null)
+                {
+                    if (plc.IsConnected)
+                    {
+                        byte[] bytes = System.Text.Encoding.UTF8.GetBytes(data);
+                        plc.WriteBytes(DataType.DataBlock, dbNo, startByteAdr, bytes);
+
+                        if (!result)
+                        {
+                            //鍐欏畬鍐嶈涓�纭
+                            var readData = ReadString(deviceIp, dbNo, startByteAdr, data.Length);
+                            result = readData == data;
+                        }
+                    }
+                    else
+                    {
+                        Link(plc);//璁惧鏈繛鎺ワ紝閲嶈繛
+                    }
+                }
+                else
+                {
+                    //涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�
+                }
+
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"{ex.Message}\r\n{ex.StackTrace}");
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 鎵归噺璇诲彇鎴栧崟鐙鍙朌B鍧楁暟鎹紙8浣峛yte锛�+        /// </summary>
+        /// <param name="deviceIp">plc璁惧閫氳鍦板潃</param>
+        /// <param name="dbNo">DB鍧楀彿</param>
+        /// <param name="startByteAdr">璧峰byte鍦板潃锛屾渶灏忓�0锛�=8浣�1涓狟lock</param>
+        /// <param name="count">璇诲彇鐨勪釜鏁帮紝1涓�8浣嶅崄鍏繘鍒舵暟</param>
+        /// <returns></returns>
+        public static byte[] ReadBytes(string deviceIp, int dbNo, int startByteAdr, int count)
+        {
+            byte[] result = null;
+            try
+            {
+                var plc = GetPlc(deviceIp);
+                if (plc != null)
+                {
+                    if (plc.IsConnected)
+                    {
+                        result = plc.ReadBytes(DataType.DataBlock, dbNo, startByteAdr, count);
+
+                        if (result.Length == 0)
+                        {
+                            Link(plc);//璁惧鍙戦�鐨勬暟鎹负绌猴紝閲嶈繛
+                        }
+                    }
+                    else
+                    {
+                        Link(plc);//璁惧鏈繛鎺ワ紝閲嶈繛
+                    }
+                }
+                else
+                {
+                    LogHelper.Info($"涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�");//涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�
+                }
+
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"{ex.Message}\r\n{ex.StackTrace}");
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 鎵归噺鍐欏叆鎴栧崟鐙啓鍏B鍧楁暟鎹紙8浣峛yte锛�+        /// </summary>
+        /// <param name="deviceIp">plc璁惧閫氳鍦板潃</param>
+        /// <param name="dbNo">DB鍧楀彿</param>
+        /// <param name="startByteAdr">璧峰byte鍦板潃锛屾渶灏忓�0锛�=8浣�1涓狟lock</param>
+        /// <param name="data">瑕佸啓鍏ョ殑鏁版嵁</param>
+        /// <returns></returns>
+        public static bool WriteBytes(string deviceIp, int dbNo, int startByteAdr, byte[] data)
+        {
+            var result = false;
+            try
+            {
+                var plc = GetPlc(deviceIp);
+                if (plc != null)
+                {
+                    if (plc.IsConnected)
+                    {
+                        plc.WriteBytes(DataType.DataBlock, dbNo, startByteAdr, data);
+
+                        if (!result)
+                        {
+                            //鍐欏畬鍐嶈涓�纭
+                            var readData = ReadBytes(deviceIp, dbNo, startByteAdr, data.Length);
+                            result = readData.SequenceEqual(data);
+                        }
+                    }
+                    else
+                    {
+                        Link(plc);//璁惧鏈繛鎺ワ紝閲嶈繛
+                    }
+                }
+                else
+                {
+                    LogHelper.Info($"涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�");//涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�
+                }
+
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"{ex.Message}\r\n{ex.StackTrace}");
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 鎵归噺璇诲彇鎴栧崟鐙鍙朌B鍧楁暟鎹紙1浣峛it锛�+        /// </summary>
+        /// <param name="deviceIp">plc璁惧閫氳鍦板潃</param>
+        /// <param name="dbNo">DB鍧楀彿</param>
+        /// <param name="startByteAdr">璧峰byte鍦板潃锛屾渶灏忓�0锛�=8浣�1涓狟lock</param>
+        /// <param name="count">瑕佽鍙栧灏戜綅</param>
+        /// <param name="bitAdr">浠庣鍑犱綅寮�璇诲彇</param>
+        /// <returns></returns>
+        public static BitArray ReadBits(string deviceIp, int dbNo, int startByteAdr, int count, byte bitAdr = 0)
+        {
+            BitArray result = null;
+            try
+            {
+                var plc = GetPlc(deviceIp);
+                if (plc != null)
+                {
+                    if (plc.IsConnected)
+                    {
+                        var data = plc.Read(DataType.DataBlock, dbNo, startByteAdr, VarType.Bit, count, bitAdr);
+                        if (count == 1)
+                        {
+                            result = new BitArray(new bool[] { (bool)data });
+                        }
+                        else
+                        {
+                            result = (BitArray)data;
+                        }
+                        if (result.Length == 0)
+                        {
+                            Link(plc);//璁惧鍙戦�鐨勬暟鎹负绌猴紝閲嶈繛
+                        }
+                    }
+                    else
+                    {
+                        Link(plc);//璁惧鏈繛鎺ワ紝閲嶈繛
+                    }
+                }
+                else
+                {
+                    LogHelper.Info($"涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�");//涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�
+                }
+
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"{ex.Message}\r\n{ex.StackTrace}");
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 鎵归噺鍐欏叆鎴栧崟鐙啓鍏B鍧楁暟鎹紙1浣峛it锛�+        /// </summary>
+        /// <param name="deviceIp">plc璁惧閫氳鍦板潃</param>
+        /// <param name="dbNo">DB鍧楀彿</param>
+        /// <param name="startByteAdr">璧峰byte鍦板潃锛屾渶灏忓�0锛�=8浣�1涓狟lock</param>
+        /// <param name="biteAdr">璧峰bit鍦板潃锛屼粠绗嚑浣嶅紑濮嬪啓k</param>
+        /// <param name="bitValue">瑕佸啓鍏ョ殑鏁版嵁</param>
+        /// <returns></returns>
+        public static bool WriteBits(string deviceIp, int dbNo, int startByteAdr, byte biteAdr, BitArray bitValue)
+        {
+            var result = false;
+            try
+            {
+                var plc = GetPlc(deviceIp);
+                if (plc != null)
+                {
+                    if (plc.IsConnected)
+                    {
+                        for (int i = 0; i < bitValue.Length; i++)
+                        {
+                            plc.WriteBit(DataType.DataBlock, dbNo, startByteAdr, biteAdr + i, bitValue[i]);
+                        }
+
+                        if (!result)
+                        {
+                            //鍐欏畬鍐嶈涓�纭
+                            var readData = ReadBits(deviceIp, dbNo, startByteAdr, bitValue.Length, biteAdr);
+                            result = CompareBitArray(readData, bitValue);
+                        }
+                    }
+                    else
+                    {
+                        Link(plc);//璁惧鏈繛鎺ワ紝閲嶈繛
+                    }
+                }
+                else
+                {
+                    LogHelper.Info($"涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�");//涓嶅瓨鍦ㄧ殑璁惧銆傞厤缃枃浠朵腑鏄惁鍖呭惈鍏惰澶囥�
+                }
+
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"{ex.Message}\r\n{ex.StackTrace}");
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 鑾峰彇PLC璇诲啓瀵硅薄
+        /// </summary>
+        /// <param name="plc"></param>
+        /// <returns></returns>
+        private static Plc GetPlc(string plc)
+        {
+            if (ip_Plc.ContainsKey(plc))
+            {
+                return ip_Plc[plc];
+            }
+            else
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// 姣旇緝涓や釜浜岃繘鍒剁殑鏁板�鏄惁鐩稿悓
+        /// </summary>
+        /// <param name="b1"></param>
+        /// <param name="b2"></param>
+        /// <returns></returns>
+        private static bool CompareBitArray(BitArray b1, BitArray b2)
+        {
+            bool result = true;
+            b1.Xor(b2).Not();//寮傛垨鎿嶄綔 鐒跺悗 闈炴搷浣�+
+            foreach (var item in b1)
+            {
+                if (!(bool)item)
+                {
+                    result = false;
+                    break;
+                }
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 閫氳繃S7鍗忚杩炴帴涓嬩綅鏈烘椂闇�鐨刴odel锛屽簲璇ユ斁鍦╩odel灞傦紝杩欓噷鎴戞噿浜�+        /// </summary>
+        public class S7ConfigModel
+        {
+            public CpuType CpuType { set; get; }//鍗忚绫诲瀷
+            public string Ip { set; get; }//IP鍦板潃
+            public short Rack { set; get; }//鏋跺瓙鍙�+            public short Slot { set; get; }//鎻掓Ы鍙�+        }
+
+    }
+}
diff --git a/Devices/ScanCodeHelper.cs b/Devices/ScanCodeHelper.cs
new file mode 100644
index 0000000..9bdfbae
--- /dev/null
+++ b/Devices/ScanCodeHelper.cs
@@ -0,0 +1,63 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Dispatch;
+using HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.config;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HH.WCS.Mobox3.AnGang.Helpers;
+
+namespace HH.WCS.Mobox3.AnGang.Devices
+{
+    /// <summary>
+    /// 灏忚溅璇诲崱鍣ㄩ�杩嘥CPServer鍙戦�娑堟伅瀛樺偍鍦ㄨ繖
+    /// </summary>
+    public class ScanCodeHelper
+    {
+        public static Dictionary<string, ScanInfoModel> scanInfoDic = new Dictionary<string, ScanInfoModel>();//鍐呭瓨淇℃伅缂撳瓨
+
+        internal static bool GetRFIDByAgvCode(string agvCode,string RFID)
+        {
+            var db = DbHelper.GetDbClient();
+            var task = new TN_Task();
+            task = db.Queryable<TN_Task>().Where(a => a.S_EQ_NO == agvCode && a.N_B_STATE == 2).OrderByDescending(b => b.T_CREATE).First();
+            if (task != null && RFID.Contains(task.S_CNTR_CODE))
+            {
+                LogHelper.Info($"鏍¢獙鎴愬姛Agv锛歿agvCode}瀹瑰櫒鍙凤細{RFID}");
+                return true;
+            }
+            else
+            {
+                LogHelper.Info($"鏍¢獙澶辫触Agv锛歿agvCode}瀹瑰櫒鍙凤細{RFID}");
+
+                //鏍¢獙澶辫触灏卞彇娑堜换鍔�+                var task1 = Task.Run(() => 
+                {
+                    if (task != null)
+                    {
+                        var res = NDCApi.ChangeOrderParam(task.S_CODE, 6, "2");
+                        LogHelper.Info($"AGV鏍¢獙RFID澶辫触锛屽彂閫佸彇娑堜换鍔″懡浠ゅ弬鏁�鏀逛负2锛屼换鍔″彿{task.S_CODE}");
+                        if (res.err_code==0)
+                        {
+                            LogHelper.Info($"AGV鏍¢獙RFID澶辫触锛屽彂閫佸彇娑堜换鍔″懡浠ゅ弬鏁�鏀逛负2锛屼换鍔″彿{task.S_CODE}锛岀粨鏋滐細鍙栨秷鎴愬姛");
+                        }
+                        else
+                        {
+                            LogHelper.Info($"AGV鏍¢獙RFID澶辫触锛屽彂閫佸彇娑堜换鍔″懡浠ゅ弬鏁�鏀逛负2锛屼换鍔″彿{task.S_CODE}锛岀粨鏋滐細鍙栨秷澶辫触锛歿res.err_msg}");
+                        }
+                    }
+                });
+                
+                return false;
+            }
+        }
+    }
+
+    public class ScanInfoModel
+    {
+        public string AgvCode { get; set; }//agv缂栧彿
+        public string AgvAddress { get; set; }//agv璇诲崱鍣ㄥ湴鍧�+        public string RFID { get; set; }//agv璇诲崱鍣ㄤ笂鎶ョ殑RFID锛屾墭鐩�+    }
+}
diff --git a/Devices/TcpClient.cs b/Devices/TcpClient.cs
new file mode 100644
index 0000000..78ca7de
--- /dev/null
+++ b/Devices/TcpClient.cs
@@ -0,0 +1,85 @@
+锘縰sing HH.WCS.Mobox3.AnGang;
+using HH.WCS.Mobox3.AnGang.Devices;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Devices {
+    internal class TcpClient
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="ip">127.0.0.1</param>
+        /// <param name="port">8888</param>
+        /// <param name="hex">01 02 00 00 00 0C 78 0F</param>
+        /// <returns></returns>
+        private static string SendHexOnce(string ip, int port, string hex) {
+            var res = string.Empty;
+            Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+            client.Connect(ip, port);
+            client.ReceiveTimeout = 2000;
+            if (client.Connected) {
+                client.Send(PlcHelper.Hex2Bytes(hex));
+                byte[] buffer = new byte[1024];
+                try {
+                    var length = client.Receive(buffer, SocketFlags.None);
+                    byte[] data = new byte[length];
+                    Array.Copy(buffer, data, length);
+                    res = BitConverter.ToString(data).Replace("-", "");
+                }
+                catch (Exception ex) {
+                    LogHelper.Error(ex.Message, ex);
+                }
+                client.Disconnect(true);
+                client.Dispose();
+            }
+            client = null;
+            return res;
+        }
+
+        /// <summary>
+        /// 璇讳繚鎸佸瘎瀛樺櫒锛宮odbus rtu鐨勫皝瑁�+        /// </summary>
+        /// <param name="address"></param>
+        /// <param name="qty"></param>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        /// <returns></returns>
+        internal int[] ReadInputRegistersRtu(int address, int qty, string ip, int port = 502) {
+            List<int> res = new List<int>();
+            var hex = $"0103{address.ToString("X4")}{qty.ToString("X4")}";
+            hex = hex + BitConverter.ToString(PlcHelper.CRC16LH(PlcHelper.Hex2Bytes(hex))).Replace("-", "").Replace(" ", "");
+            var data = SendHexOnce(ip, port, hex);
+            if (!string.IsNullOrEmpty(data)) {
+                if (PlcHelper.CheckCRC(data)) {
+                    var lenght = Convert.ToInt16(data.Substring(4, 2), 16) / 2;
+                    for (int i = 0; i < lenght; i++) {
+                        res[i] = Convert.ToInt16(data.Substring(6 + 4 * 1, 4), 16);
+                    }
+                }
+            }
+            return res.ToArray();
+        }
+        /// <summary>
+        /// 鍐欏崟涓瘎瀛樺櫒
+        /// </summary>
+        /// <param name="address"></param>
+        /// <param name="value"></param>
+        /// <param name="ip"></param>
+        /// <param name="port"></param>
+        internal bool WriteSingleRegisterRtu(int address, int value, string ip, int port = 502) {
+            var res = false;
+            var hex = $"0106{address.ToString("X4")}{value.ToString("X4")}";
+            hex = hex + BitConverter.ToString(PlcHelper.CRC16LH(PlcHelper.Hex2Bytes(hex))).Replace("-", "").Replace(" ", "");
+            var data = SendHexOnce(ip, port, hex);
+            if (!string.IsNullOrEmpty(data)) {
+                res = true;
+            }
+            return res;
+        }
+    }
+}
diff --git a/Devices/TcpServer.cs b/Devices/TcpServer.cs
new file mode 100644
index 0000000..f17e677
--- /dev/null
+++ b/Devices/TcpServer.cs
@@ -0,0 +1,251 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Dispatch;
+using HH.WCS.Mobox3.AnGang.config;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+
+namespace HH.WCS.Mobox3.AnGang.Devices
+{
+    public class TcpServer
+    {
+        public TcpServer(string ip, int port)
+        {
+            Init(ip, port);
+        }
+        private void Init(string ip, int port)
+        {
+            //鍒涘缓涓�釜鏂扮殑Socket,杩欓噷鎴戜滑浣跨敤鏈�父鐢ㄧ殑鍩轰簬TCP鐨凷tream Socket锛堟祦寮忓鎺ュ瓧锛�+            var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+            try
+            {
+                //灏嗚socket缁戝畾鍒颁富鏈轰笂闈㈢殑鏌愪釜绔彛锛岀鍙e簲璇ユ斁鍒伴厤缃枃浠朵腑
+                socket.Bind(new IPEndPoint(IPAddress.Parse(ip), port));
+                Console.WriteLine(port);
+                //鍚姩鐩戝惉锛屽苟涓旇缃竴涓渶澶х殑闃熷垪闀垮害
+                socket.Listen(30);
+                //寮�鎺ュ彈瀹㈡埛绔繛鎺ヨ姹�+                socket.BeginAccept(new AsyncCallback(ClientAccepted), socket);
+            }
+            catch (Exception e)
+            {
+                Console.WriteLine(e.Message);
+            }
+        }
+        public static Dictionary<string, Socket> clients = new Dictionary<string, Socket>();
+        public static Dictionary<string, byte[]> buffers = new Dictionary<string, byte[]>();
+        public static Dictionary<string,bool> isSend = new Dictionary<string, bool>();
+        public static Dictionary<string,bool> isCheck = new Dictionary<string, bool>();
+
+        public static Dictionary<string,int> saoMa = new Dictionary<string, int>();
+
+        public static void ClientAccepted(IAsyncResult ar)
+        {
+
+            var socket = ar.AsyncState as Socket;
+            var client = socket.EndAccept(ar);
+            string remote_ip = ((System.Net.IPEndPoint)client.RemoteEndPoint).Address.ToString();
+            if (clients.Keys.Contains(remote_ip))
+            {
+                clients[remote_ip] = client;
+            }
+            else
+            {
+                clients.Add(remote_ip, client);
+            }
+            if (!buffers.Keys.Contains(remote_ip))
+            {
+                buffers.Add(remote_ip, new byte[1024]);
+            }
+
+            if (!isSend.Keys.Contains(remote_ip))
+            {
+                isSend.Add(remote_ip, false);
+            }
+
+            if (!isCheck.Keys.Contains(remote_ip))
+            {
+                isCheck.Add(remote_ip, false);
+            }
+
+            //缁欏鎴风鍙戦�涓�釜娆㈣繋娑堟伅
+            //client.Send(Encoding.Unicode.GetBytes("Hi there, I accept you request at " + DateTime.Now.ToString()));
+            Console.WriteLine(remote_ip);
+
+            try
+            {
+                client.BeginReceive(buffers[remote_ip], 0, buffers[remote_ip].Length, SocketFlags.None, new AsyncCallback(ReceiveMessage), client);
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine($"銆愭帴鏀跺鎴风鐨勬秷鎭紓甯搞�锛� + ex.Message);
+            }
+            //鍑嗗鎺ュ彈涓嬩竴涓鎴风璇锋眰
+            socket.BeginAccept(new AsyncCallback(ClientAccepted), socket);
+        }
+
+
+        public static void ReceiveMessage(IAsyncResult ar)
+        {
+            try
+            {
+                var socket = ar.AsyncState as Socket;
+                string remote_ip = ((System.Net.IPEndPoint)socket.RemoteEndPoint).Address.ToString();
+                var length = socket.EndReceive(ar);
+                if (length == 0)
+                {
+                    clients.Remove(remote_ip);
+                    buffers.Remove(remote_ip);
+                    isSend.Remove(remote_ip);
+                    isCheck.Remove(remote_ip);
+                    saoMa.Remove(remote_ip);
+                    return;
+                }
+                else
+                {
+                    if (!clients.Keys.Contains(remote_ip))
+                    {
+                        clients.Add(remote_ip, socket);
+                    }
+                    if (!buffers.Keys.Contains(remote_ip))
+                    {
+                        buffers.Add(remote_ip, new byte[1024]);
+                       
+                    }
+                    if (!isSend.Keys.Contains(remote_ip))
+                    {
+                        isSend.Add(remote_ip, false);
+                    }
+                    if (!isCheck.Keys.Contains(remote_ip))
+                    {
+                        isCheck.Add(remote_ip, false);
+                    }
+                    if (!saoMa.Keys.Contains(remote_ip))
+                    {
+                        saoMa.Add(remote_ip, 3);
+                    }
+                }
+
+                    //LogHelper.Info($"鎺ユ敹鍒颁俊鎭紝IP锛歿remote_ip},MSG锛歿BitConverter.ToString(buffers[remote_ip])}");
+
+                    if (buffers.Keys.Contains(remote_ip))
+                    {
+                        var messageBytes = new byte[length];
+                        Array.Copy(buffers[remote_ip], 0, messageBytes, 0, length);
+
+                    try
+                    {
+                        //璇诲崱鍣ㄦ牎楠�+                        var message = BitConverter.ToString(messageBytes);
+
+                        if (!saoMa.ContainsKey(remote_ip))
+                        {
+                            saoMa.Add(remote_ip, 3);
+                        }
+                        if (messageBytes.Length <= 20 && messageBytes.Length > 0)
+                        {
+                            saoMa[remote_ip] = 3;//鏈壂鍒扮爜
+                        }
+
+                        if (messageBytes.Length >= 21 && isCheck[remote_ip])
+                        {
+                            byte[] rfid = new byte[12];
+                            Array.Copy(messageBytes, 9, rfid, 0, 12);
+
+                            string rfids16 = BitConverter.ToString(rfid);
+                            string rfids = Encoding.ASCII.GetString(rfid);
+                            //LogHelper.Info($"璇诲崱鍣ㄦ牎楠屽搴斿鍣ㄥ彿锛歿rfids}锛屽叾16杩涘埗褰㈠紡锛歿rfids16}");
+                            //if (ScanCodeHelper.Analysis(remote_ip, rfids))//鏍¢獙RFID
+                            //{
+                            //    isCheck[remote_ip] = false;
+                            //    saoMa[remote_ip] = 1;//鎵爜鍖归厤
+                            //}
+                            //else
+                            //{
+                            //    isCheck[remote_ip] = false;
+                            //    saoMa[remote_ip] = 2;//鎵爜涓嶅尮閰�+                            //}
+                        }
+                        else
+                        {
+                            LogHelper.Info($"涓嶆弧瓒宠鍗″櫒鏍¢獙瑙勫畾锛欼P锛歿remote_ip},MSG锛歿message}");
+                        }
+                    }
+                    catch(Exception ex)
+                    {
+                        LogHelper.Info($"鎵爜鏍¢獙鍙戠敓浜嗗紓甯革細{ex.Message}");
+                        saoMa[remote_ip] = 4;//鎵爜寮傚父
+                    }
+
+                    try
+                    {
+                        
+                    }
+                    catch(Exception ex)
+                    {
+                        LogHelper.Info($"鍗峰笜闂ㄦ牎楠屽彂鐢熶簡寮傚父锛歿ex.Message}");
+                    }
+                        //TcpServerSend(remote_ip, System.Text.Encoding.Default.GetBytes(msgSend));
+                        Array.Clear(buffers[remote_ip], 0, buffers[remote_ip].Length);//娓呯┖褰撳墠IP Buffer
+                    }
+                    else
+                    {
+                        if (!buffers.Keys.Contains(remote_ip))
+                        {
+                            buffers.Add(remote_ip, new byte[1024]);
+                        }
+                    }
+  
+                //鎺ユ敹涓嬩竴涓秷鎭�鍥犱负杩欐槸涓�釜閫掑綊鐨勮皟鐢紝鎵�互杩欐牱灏卞彲浠ヤ竴鐩存帴鏀舵秷鎭簡锛�+                socket.BeginReceive(buffers[remote_ip], 0, buffers[remote_ip].Length, SocketFlags.None, new AsyncCallback(ReceiveMessage), socket);
+            }
+            catch (Exception ex)
+            {
+               
+            }
+        }
+
+        private static string GetHexString(byte[] buffer, int lenght)
+        {
+            return BitConverter.ToString(buffer, 0, lenght).Replace("-", string.Empty).ToLower();
+        }
+
+        public static bool TcpServerSend(string ip, byte[] msg)
+        {
+            if (clients.Keys.Contains(ip))
+            {
+                var client = clients[ip];
+                if (client.Connected)
+                {
+                    try
+                    {
+                        client.Send(msg);
+                        LogHelper.Info($"宸插彂閫佺粰璇GV鍦板潃{ip}锛寋msg}");
+                        return true;
+                    }
+                    catch (SocketException ex)
+                    {
+                        LogHelper.Info(ex.Message, "Error");
+                        clients[ip].Close();
+                        clients.Remove(ip);
+                    }
+                }
+                else
+                {
+                    clients[ip].Close();
+                    clients.Remove(ip);
+                }
+            }
+            else
+            {
+                LogHelper.Info("鏈壘鍒拌璁惧锛屾槸鍚﹀凡杩炴帴锛�);
+            }
+            return false;
+
+        }
+
+    }
+}
diff --git a/Dispatch/GZRobot.cs b/Dispatch/GZRobot.cs
new file mode 100644
index 0000000..f3a5d30
--- /dev/null
+++ b/Dispatch/GZRobot.cs
@@ -0,0 +1,504 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.IdentityModel.Protocols.WSTrust;
+using System.Threading.Tasks;
+
+using HH.WCS.Mobox3.AnGang.config;
+using HH.WCS.Mobox3.AnGang.Helper;
+using HH.WCS.Mobox3.AnGang.Helpers;
+using HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.Services;
+
+using Newtonsoft.Json;
+
+using static HH.WCS.Mobox3.AnGang.Controllers.ApiModel;
+using static HH.WCS.Mobox3.AnGang.Dtos.Request.AgvRequest;
+
+namespace HH.WCS.Mobox3.AnGang.Dispatch {
+    /// <summary>
+    /// 鍥借嚜璋冨害杈呭姪绫�+    /// </summary>
+    public class GZRobot {
+        private static readonly HttpHelper apiHelper = new HttpHelper();
+        private static readonly string baseUrl = AppStart.Settings.Config.RCSApiUrl;//閰嶇疆鏂囦欢鑾峰彇鍥借嚜璋冨害鍦板潃
+        //private static readonly string logName = "guozi";
+        public static List<IOState> GetIO() {
+            var result = apiHelper.Get(baseUrl + "api/engine/view/iostates/");
+            var data = JsonConvert.DeserializeObject<gzResult<IOState>>(result);
+            return data.data;
+        }
+        public static void UpdateIOState() {
+            var data = new { data = new List<IOSateInfo>() };
+            var result = apiHelper.Post(baseUrl + "api/engine/tasks/iostates/", JsonConvert.SerializeObject(data));
+            var dataResult = JsonConvert.DeserializeObject<gzResult<IOStatesInfoResult>>(result);
+        }
+
+
+        public static int CreateOrder(string taskNo, int priority, string param, string ts = "churuku", string created_user = "hanhe") {
+            LogHelper.Info($"CreateOrder鍙傛暟淇℃伅:taskNo:{taskNo},priority:{priority},param:{param},ts:{ts}锛宑reated_user锛歿created_user}", "API");
+            var msg = "";
+            var orderId = 0;
+            var data = new OrderInfo() { order_name = taskNo, priority = priority, dead_line = DateTime.Now, ts_name = ts, parameters = param, created_user = created_user };
+            var request = JsonConvert.SerializeObject(data);
+            var response = apiHelper.Post(baseUrl + "api/om/order/", request);
+            LogHelper.Info($"CreateOrder:url:{baseUrl}api/om/order/,request:{request}", "API");
+            msg = $"[guozi-CreateOrder] request={request} response={response}";
+            Console.WriteLine(msg);
+            if (response != "") {
+                try {
+                    var dataResult = JsonConvert.DeserializeObject<gzResult<OrderInfoResult>>(response);
+                    if (dataResult.code == 0) {
+                        orderId = dataResult.data[0].in_order_id;
+                    }
+                }
+                catch (Exception ex) {
+                }
+            }
+            else {
+                msg = "[guozi-CreateOrder]鍒涘缓璁㈠崟澶辫触";
+                Console.WriteLine(msg);
+                LogHelper.Info($"鍒涘缓璁㈠崟澶辫触", "API");
+            }
+
+
+            return orderId;
+        }
+        public static bool CancelOrder(int orderId) {
+            bool result = false;
+            string msg = "";
+            var request = new CancelOrderInfo() { order_list = new List<int>(orderId) };
+            var response = apiHelper.Post(baseUrl + "api/om/order/cancel/", JsonConvert.SerializeObject(request));
+            msg = $"[guozi-CancelOrder] request={request};response={response}";
+            Console.WriteLine(msg);
+            if (response != "") {
+                var dataResult = JsonConvert.DeserializeObject<gzResult<CancelOrderInfoResult>>(response);
+                if (dataResult.code == 0) {
+                    result = true;
+                }
+            }
+            else {
+                msg = "[guozi-CancelOrder]鍙栨秷璁㈠崟澶辫触";
+                Console.WriteLine(msg);
+            }
+            return result;
+        }
+
+        public static bool CancelGZOrder(int orderId) {
+            bool result = false;
+            string msg = "";
+            List<CancelGZOrderInfo> requests = new List<CancelGZOrderInfo>();
+            var request = new CancelGZOrderInfo() { order_id = orderId, order_command_type_id = 2 };
+            requests.Add(request);
+            var response = apiHelper.Put(baseUrl + "api/om/order/order-command/", JsonConvert.SerializeObject(requests));
+            msg = $"[guozi-CancelOrder] request={requests};response={response}";
+            if (response != "") {
+                var dataResult = JsonConvert.DeserializeObject<CancelGZOrderResult>(response);
+                if (dataResult.code == 0) {
+                    msg = "[guozi-CancelOrder]鍙栨秷璁㈠崟鎴愬姛";
+                    Console.WriteLine(msg);
+                    result = true;
+                    return result;
+                }
+            }
+            else {
+                msg = "[guozi-CancelOrder]鍙栨秷璁㈠崟澶辫触";
+                Console.WriteLine(msg);
+            }
+            return result;
+        }
+
+
+        /// <summary>
+        /// 璁㈠崟鐘舵�鍙嶉
+        /// </summary>
+        /// <returns></returns>
+        public static GzResult orderStatusReport(orderStatusReportParme model) {
+            GzResult result = new GzResult();
+            AgvTaskState agv = new AgvTaskState();
+
+            if (model == null) {
+                result.resultCode = 1;
+                result.orderID = model.orderID;
+                result.msg = "杩斿洖璁㈠崟鐘舵�澶辫触";
+            }
+
+            switch (model.orderStatus) {
+                case "active":
+                    agv.state = 1;
+                    break;
+                case "waiting":
+                    agv.state = 1;
+                    break;
+                case "source_finish":
+                    //鍙栬揣瀹屾垚
+                    agv.state = 4;
+                    
+                    //var checkWeightTask = Task.Run(() => {
+                    //    ChooseFinalEndLoc(model);
+                    //});
+
+                    break;
+                case "dest_finish":
+                    //鍗歌揣瀹屾垚
+                    agv.state = 6;
+                    break;
+                case "finish":
+                    agv.state = 2;
+                    break;
+                case "manually_finish":
+                    agv.state = 2;
+                    break;
+                case "cancel_finish":
+                    agv.state = 7;
+                    break;
+                case "error":
+                    agv.state = 7;
+                    break;
+                default:
+                    agv.state = 0;
+                    break;
+            }
+            if (agv.state != 0) {
+                agv.task_no = model.orderName;
+                agv.forklift_no = model.agvIDList;
+                AgvService.OperateAgvTaskStatus(agv);
+            }
+
+            result.resultCode = 0;
+            result.msg = "杩斿洖璁㈠崟鐘舵�鎴愬姛";
+            result.orderID = model.orderID;
+            LogHelper.Info("orderStatusReport杩斿洖淇℃伅" + JsonConvert.SerializeObject(result), "API");
+            return result;
+        }
+
+        //public static void ChooseFinalEndLoc(orderStatusReportParme model) {
+
+        //    var db = DbHelper.GetDbClient();
+
+        //    var tn_task = db.Queryable<TN_Task>().First(a => a.S_EQ_NO == model.agvIDList && a.S_END_AREA == "" && a.S_END_LOC == "" && a.S_TYPE == "浜у搧鍏ュ簱(PDA)");
+
+        //    // 鍙浠诲姟涓轰骇鍝佸叆搴�PDA)锛屽氨闇�閲嶆柊鎸囧畾缁堢偣锛堥粯璁ndLoc涓�"锛�+        //    if (tn_task.S_TYPE == "浜у搧鍏ュ簱(PDA)") {
+
+        //        var endLoc = new TN_Location();
+
+        //        // 鍙綋涔嬪墠鎸囧畾缁堢偣璐ф灦鍚庯紝鎵嶅皾璇曡绠楃粓鐐硅揣浣嶏紝鍚﹀垯浜ょ粰浜哄伐鍐冲畾
+        //        if (tn_task.S_END_AREA != "") {
+        //            if (tn_task.F_WEIGHT > 1500) {
+        //                // 閲嶉噺瓒呰繃1.5t锛岄渶瑕侀�鎷�-3灞傝揣鏋�+        //                endLoc = db.Queryable<TN_Location>().First(a => a.S_SHELF_CODE == tn_task.S_END_AREA && LocationHelper.IsFree(a) && a.N_CURRENT_NUM == 0 && a.N_HEIGHT <= 3);
+        //            }
+        //            else if (tn_task.F_WEIGHT > 0) {
+        //                // 閲嶉噺鏈秴杩�.5t锛屽湪鎸囧畾璐ф灦闅忎究閫夋嫨1涓�+        //                endLoc = db.Queryable<TN_Location>().First(a => a.S_SHELF_CODE == tn_task.S_END_AREA && LocationHelper.IsFree(a) && a.N_CURRENT_NUM == 0);
+        //            }
+        //            else {
+        //                // 娌℃湁鎺ユ敹鍒伴噸閲忥紝鎴栭噸閲忓嚭閿�+        //                endLoc = null;
+        //                LogHelper.Info($"閿欒鐨勯噸閲忎俊鎭細{tn_task.F_WEIGHT}");
+        //            }
+
+        //            // 濡傛灉娌℃湁绗﹀悎鏉′欢鐨勮揣浣嶏紝缃┖锛岀瓑寰匬DA閲嶆柊纭畾
+        //            if (endLoc == null) {
+        //                tn_task.S_END_AREA = "";
+        //                tn_task.S_END_LOC = "";
+
+        //                if (db.Updateable<TN_Task>(tn_task).ExecuteCommand() > 0) {
+        //                    //LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+        //                    LogHelper.Info($"閲嶆柊璁$畻鍚庢病鏈夊悎閫傝揣浣嶏紝浠诲姟 {tn_task.S_CODE} 淇敼鎴愬姛锛屼慨鏀圭粓鐐硅揣鏋跺拰璐т綅涓虹┖");
+        //                }
+        //                else {
+        //                    LogHelper.Info($"閲嶆柊璁$畻鍚庢病鏈夊悎閫傝揣浣嶏紝浠诲姟 {tn_task.S_CODE} 淇敼澶辫触锛屼慨鏀圭粓鐐硅揣鏋跺拰璐т綅涓虹┖");
+        //                }
+        //            }
+        //            else {
+        //                // 鎵惧埌鍚堥�鐨勮揣浣嶏紝鎺ㄩ�
+        //                tn_task.S_END_LOC = endLoc.S_CODE;
+
+        //                using (var trans = db.Ado.UseTran()) {
+        //                    if (db.Updateable<TN_Task>(tn_task).ExecuteCommand() > 0) {
+        //                        LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+        //                        trans.CommitTran();
+        //                        LogHelper.Info($"璁$畻璐т綅鎴愬姛锛屼换鍔�{tn_task.S_CODE} 淇敼鎴愬姛锛岀粓鐐硅揣鏋朵负 {endLoc.S_SHELF_CODE}锛屼慨鏀圭粓鐐逛綅缃负 {endLoc.S_CODE}");
+        //                    }
+        //                    else {
+        //                        trans.RollbackTran();
+
+        //                        LogHelper.Info($"璁$畻璐т綅鎴愬姛锛屼换鍔�{tn_task.S_CODE} 淇敼澶辫触锛岀粓鐐硅揣鏋朵负 {endLoc.S_SHELF_CODE}锛屼慨鏀圭粓鐐逛綅缃负 {endLoc.S_CODE}");
+        //                    }
+        //                }
+
+
+        //            }
+        //        }
+        //    }
+        //}
+
+        public class CancelGZOrderInfo
+        {
+            public int order_id { get; set; }
+
+            public int order_command_type_id { get; set; }
+
+        }
+
+
+        public static QueryOrderResult QueryOrder(int id) {
+            //
+            var result = new QueryOrderResult() { agv_list = new List<int> { 0 } };
+            string msg = "";
+            var response = apiHelper.Get(baseUrl + $"/api/om/order/{id}/");
+            msg = $"[guozi-QueryOrderResult] request={id};response={response}";
+            Console.WriteLine(msg);
+            if (response != "") {
+                var data = JsonConvert.DeserializeObject<gzResult<QueryOrderResult>>(response);
+                result = data.data[0];
+            }
+            else {
+                msg = "[guozi-QueryOrderResult]鏌ヨ璁㈠崟淇℃伅澶辫触";
+                Console.WriteLine(msg);
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 鑾峰彇浜や簰淇℃伅
+        /// </summary>
+        /// <param name="typeId">1浠诲姟鐘舵�  2寮�棬鎴栦氦绠� 3鐩殑鐐�/param>
+        /// <param name="status"></param>
+        /// <returns></returns>
+        public static List<InteractInfoResult> QueryInteractInfo(int typeId, string status = "active") {
+
+            //string aaa = "{\"app_name\": \"Gouzi client\", \"version\": \"1.0.0\", \"code\": 0, \"msg\": \"success\", \"data\": [{\"interaction_info_id\": 233, \"interaction_info_name\": \"TN2012030001\", \"interaction_info_desp\": null, \"interaction_info_type_id\": 3, \"value_json\": {\"state\": \"4\"}, \"info_status\": \"active\", \"return_value\": null}]}";
+            //var data = JsonConvert.DeserializeObject<gzResult<InteractInfoResult>>(aaa);
+            var list = new List<InteractInfoResult>();
+            string msg = "";
+            var result = apiHelper.Get(baseUrl + $"api/om/interaction_info/find_by_type/?type_id={typeId}&info_status={status}");
+            if (!string.IsNullOrEmpty(result)) {
+                Console.WriteLine(result);
+                // {"app_name": "Gouzi client", "version": "1.0.0", "code": 0, "msg": "success", "data": [{"interaction_info_id": 230, "interaction_info_name": "2", "interaction_info_desp": null, "interaction_info_type_id": 3, "value_json": {"state": "4"}, "info_status": "active", "return_value": null}, {"interaction_info_id": 231, "interaction_info_name": "2", "interaction_info_desp": null, "interaction_info_type_id": 3, "value_json": {"state": "6"}, "info_status": "active", "return_value": null}, {"interaction_info_id": 232, "interaction_info_name": "2", "interaction_info_desp": null, "interaction_info_type_id": 3, "value_json": {"state": "2"}, "info_status": "active", "return_value": null}, {"interaction_info_id": 233, "interaction_info_name": "TN2012030001", "interaction_info_desp": null, "interaction_info_type_id": 3, "value_json": {"state": "4"}, "info_status": "active", "return_value": null}]}
+                try {
+                    var data = JsonConvert.DeserializeObject<gzResult<InteractInfoResult>>(result);
+                    if (data.data != null) {
+                        list = data.data;
+                    }
+
+                }
+                catch (Exception ex) {
+                    Console.WriteLine(ex.Message);
+                }
+
+            }
+            else {
+                msg = "[guozi-QueryInteractInfo]璇诲彇浜や簰淇℃伅澶辫触";
+                Console.WriteLine(msg);
+            }
+            return list;
+        }
+
+        public static bool UpdateInteractInfo(UpdateInteractInfo interactInfo) {
+            string msg = "";
+            var result = false;
+            var request = JsonConvert.SerializeObject(interactInfo);
+            var response = apiHelper.Post(baseUrl + "api/om/interaction_info/update/", request);
+            msg = $"[mes-UpdateInteractInfo] request={request};response={response}";
+            if (response != "") {
+                var dataResult = JsonConvert.DeserializeObject<gzResult<object>>(response);
+                result = dataResult.code == 0;
+            }
+            else {
+                msg = "[guozi-UpdateInteractInfo]鏇存柊浜や簰淇℃伅澶辫触";
+                Console.WriteLine(msg);
+            }
+            return result;
+        }
+
+        public static List<CustomData> CustomBuf() {
+            var res = new List<CustomData>();
+            string msg = "";
+            var result = apiHelper.Get(baseUrl + $"/api/engine/agvs/custom-buf/");
+            if (!string.IsNullOrEmpty(result)) {
+                Console.WriteLine(result);
+                
+                try {
+                    var data = JsonConvert.DeserializeObject<gzResult<CustomData>>(result);
+                    if (data.data != null) {
+                        res = data.data;
+                    }
+                    
+                }
+                catch (Exception ex) {
+                    Console.WriteLine(ex.Message);
+                }
+
+            }
+            else {
+                msg = "[guozi-CustomBuf]璇诲彇浜や簰淇℃伅澶辫触";
+                Console.WriteLine(msg);
+            }
+
+            return res;
+        }
+
+    }
+
+    //public class CustomBufInfo {
+    //    public string app_name { get; set; }
+    //    public string version { get; set; }
+    //    public int code { get; set; }
+    //    public string msg { get; set; }
+    //    public List<CustomData> data { get; set; }    
+    //}
+
+    public class CustomData {
+        public string agv_id { get; set; }
+        public string parameter_varchar200_up { get; set; }
+        public string parameter_varchar200_down { get; set; }
+    }
+
+    public class gzResult<T>
+    {
+        public string app_name { get; set; }
+        public string version { get; set; }
+        public int code { get; set; }
+        public string msg { get; set; }
+        public List<T> data { get; set; }
+    }
+    public class IOState
+    {
+        public int io_id { get; set; }
+        public string io_name { get; set; }
+        public string io_type_id { get; set; }
+        public string io_type { get; set; }
+        public int io_status_id { get; set; }
+        public string io_status_type { get; set; }
+        public string parameter_definition_int4_1 { get; set; }
+        public int io_value_int4_1 { get; set; }
+        public string parameter_definition_int4_2 { get; set; }
+        public int io_value_int4_2 { get; set; }
+        public string parameter_definition_int4_3 { get; set; }
+        public int io_value_int4_3 { get; set; }
+        public string parameter_definition_int4_4 { get; set; }
+        public int io_value_int4_4 { get; set; }
+        public string parameter_definition_json { get; set; }
+        public string io_value_json { get; set; }
+    }
+    public class IOSateInfo
+    {
+        public int io_id { get; set; }
+        public int io_status_id { get; set; }
+        public int io_value_int4_1 { get; set; }
+        public int io_value_int4_2 { get; set; }
+        public int io_value_int4_3 { get; set; }
+        public int io_value_int4_4 { get; set; }
+        public string io_value_json { get; set; }
+    }
+    public class IOStatesInfoResult
+    {
+        public List<ResultInfo> success_list { get; set; }
+        public List<ResultInfo> error_list { get; set; }
+        public class ResultInfo { public int io_id { get; set; } }
+    }
+    public class OrderInfo
+    {
+        public string order_name { get; set; }
+        public int priority { get; set; }
+        public DateTime dead_line { get; set; }
+        public string ts_name { get; set; }
+        public string parameters { get; set; }//{\"dock\":1}
+        public string created_user { get; set; }
+
+    }
+    public class OrderInfoResult
+    {
+        public int in_order_id { get; set; }
+    }
+    public class CancelOrderInfo
+    {
+        public List<int> order_list { get; set; }
+    }
+    public class CancelOrderInfoResult
+    {
+        public List<ResultInfo> success_list { get; set; }
+        public List<ResultInfo> error_list { get; set; }
+        public class ResultInfo { public int order_id { get; set; } }
+    }
+    public class cancle
+    {
+        public List<success_list> success_list { get; set; }
+        public List<error_list> error_list { get; set; }
+    }
+    public class success_list
+    {
+        public int order_id { get; set; }
+    }
+
+    public class error_list
+    {
+    }
+    public class CancelGZOrderResult
+    {
+        public string app_name { get; set; }
+        public string version { get; set; }
+        public int code { get; set; }
+        public string msg { get; set; }
+        public cancle data { get; set; }
+        public List<int> success_list { get; set; }
+        public List<int> error_list { get; set; }
+    }
+    public class QueryOrderResult
+    {
+        public int order_id { get; set; }
+        public string order_name { get; set; }
+        public int priority { get; set; }
+        public DateTime dead_line { get; set; }
+        public string ts_id { get; set; }
+        public string parameters { get; set; }//{"TN_LocationName":"3-2-B", "PalletType":1}",
+        public string trigger { get; set; }
+        public string command { get; set; }
+        public string status { get; set; }
+        public List<int> agv_list { get; set; }
+        public string current_task { get; set; }
+        public string current_dest { get; set; }
+        public string current_opt { get; set; }
+        public string current_omi { get; set; }
+        public DateTime create_time { get; set; }
+        public DateTime? active_time { get; set; }
+        public DateTime? finished_time { get; set; }
+        public DateTime? cancel_time { get; set; }
+        public string response_timespan { get; set; }
+        public string execute_timespa { get; set; }
+        public string total_timespan { get; set; }
+    }
+    public class InteractInfoResult
+    {
+        public int interaction_info_id { get; set; }
+        public string interaction_info_name { get; set; }
+        public string interaction_info_desp { get; set; }
+        public int interaction_info_type_id { get; set; }
+        public object value_json { get; set; }//{"dock": 1},
+        public string info_status { get; set; }
+        public string return_value { get; set; }
+    }
+    public class UpdateInteractInfo
+    {
+        public int interaction_info_id { get; set; }
+        public string info_status { get; set; }
+        public string return_value { get; set; }
+    }
+    public class interaction_state
+    {
+        public string state { get; set; }
+    }
+    public class interaction_door
+    {
+        public string door { get; set; }
+    }
+    public class interaction_bit
+    {
+        public string order { get; set; }
+    }
+}
+
diff --git a/Dispatch/HanAo.cs b/Dispatch/HanAo.cs
new file mode 100644
index 0000000..0f17a24
--- /dev/null
+++ b/Dispatch/HanAo.cs
@@ -0,0 +1,165 @@
+锘縰sing HH.WCS.Mobox3.AnGang.config;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Web.Services.Description;
+
+namespace HH.WCS.Mobox3.AnGang.Dispatch {
+    /// <summary>
+    /// 鍥借嚜璋冨害杈呭姪绫�+    /// </summary>
+    public class HanAo {
+        private static readonly HttpHelper apiHelper = new HttpHelper();
+        private static readonly string baseUrl ="";//閰嶇疆鏂囦欢閲岃幏鍙栧浗鑷皟搴﹀湴鍧�+        //private static readonly string logName = "hanao";
+
+        public static bool CreateOrder(TaskInfoModel model) {
+            var msg = "";
+            var result = true;
+            var request = JsonConvert.SerializeObject(model);
+            var response = apiHelper.Post(baseUrl + ":9001/wcs-admin/api/receive", request);
+            msg = $"[hanao-CreateOrder] request={request} response={response}";
+            Console.WriteLine(msg);
+            if (response != "") {
+                try {
+                    var dataResult = JsonConvert.DeserializeObject<HAResult>(response);
+                    if (dataResult.code == "0") {
+                        result = true;
+                    }
+                }
+                catch (Exception ex) {
+                    Console.WriteLine(ex.Message);
+                }
+            }
+            else {
+                msg = "[hanao-CreateOrder]鍒涘缓璁㈠崟澶辫触";
+                Console.WriteLine(msg);
+            }
+
+            LogHelper.Info(msg,"鏉ゥ");
+            return result;
+        }
+
+        public static bool CancelOrder(CancelModel model) {
+            bool result = false;
+            string msg = "";
+            var request = JsonConvert.SerializeObject(model);
+            var response = apiHelper.Post(baseUrl + ":9002/wcs-admin/api/cancel", request);
+            msg = $"[hanao-CancelOrder] request={request};response={response}";
+            Console.WriteLine(msg);
+            if (response != "") {
+                var dataResult = JsonConvert.DeserializeObject<HAResult>(response);
+                if (dataResult.code == "0") {
+                    result = true;
+                }
+            }
+            else {
+                msg = "[hanao-CancelOrder]鍙栨秷璁㈠崟澶辫触";
+                Console.WriteLine(msg);
+            }
+            LogHelper.Info(msg, "鏉ゥ");
+            return result;
+        }
+
+        public static bool QueryDevice(DeviceInfoModel model) {
+            bool result = false;
+            string msg = "";
+            var request = JsonConvert.SerializeObject(model);
+            var response = apiHelper.Get(baseUrl + ":9003//wcs-admin/api/dvc-state/", request);
+            msg = $"[hanao-QueryDeviceResult] request={request};response={response}";
+            Console.WriteLine(msg);
+            if (response != "") {
+                var dataResult = JsonConvert.DeserializeObject<HAResult>(response);
+                if (dataResult.code == "0") {
+                    result = true;
+                }
+            }
+            else {
+                msg = "[hanao-QueryOrderResult]鏌ヨ璁㈠崟淇℃伅澶辫触";
+                Console.WriteLine(msg);
+            }
+            LogHelper.Info(msg, "鏉ゥ");
+            return result;
+        }
+
+
+        public class TaskInfoModel {
+            /// <summary>
+            /// 璇锋眰pk
+            /// </summary>
+            public string requestPk { get; set; }
+            /// <summary>
+            /// 鎵樼洏鏉$爜
+            /// </summary>
+            public string contNo { get; set; }
+            /// <summary>
+            /// 鎵樼洏绫诲瀷
+            /// </summary>
+            public string contType { get; set; } = "";
+            /// <summary>
+            /// 浠诲姟绫诲瀷  1-鍏ュ簱 2-鍑哄簱 3-绉诲簱 
+            /// </summary>
+            public string trkType { get; set; }
+            /// <summary>
+            /// 1-999锛堝�瓒婂ぇ浼樺厛绾ц秺楂橈級
+            /// </summary>
+            public string trkPrty { get; set; } = "1";
+            public string frmPos { get; set; }
+            public string toPos { get; set; }
+            public string noticeInfo { get; set; } = "";
+            /// <summary>
+            /// 0-绌烘墭鐩�1-瀹炵墿
+            /// </summary>
+            public string isFull { get; set; } = "0";
+            public string groupNo { get; set; } = "";
+            public string clientCode { get; set; } = "WMS";
+            /// <summary>
+            /// 鏍煎紡锛�022-11-11 11:32:08
+            /// </summary>
+            public string reqTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+
+        }
+        public class HAResult {
+            public string code { get; set; }
+            public string msg { get; set; }
+            /// <summary>
+            /// 
+            /// </summary>
+            public string requestPk { get; set; }
+        }
+        public class CancelModel {
+            public string requestPk { get; set; }
+            public string contNo { get; set; }
+            public string clientCode { get; set; }
+            public string reqTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+        }
+        public class DeviceInfoModel {
+            public string requestPk { get; set; }
+            public string dvcNo { get; set; }
+            public string clientCode { get; set; }
+            public string reqTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+        }
+        public class TaskStateInfoModel {
+            public string requestPk { get; set; }
+            public string contNo { get; set; }
+            /// <summary>
+            /// 鍙屾柟绯荤粺鍏卞悓瀹氫箟 1-鍏ュ簱 2-鍑哄簱 3-绉诲簱 锛堝悗缁鏈夊鍔犲啀鍗忓畾锛�+            /// </summary>
+            public string noticeType { get; set; }
+            public string curPos { get; set; }
+            public string noticeInfo { get; set; }
+            /// <summary>
+            /// 0-鎴愬姛 锛堝叆搴撲笂鏋跺畬鎴�鍑哄簱涓嬫灦瀹屾垚/搴撳唴绉诲簱瀹屾垚锛氱Щ搴撳彧涓婃姤鏈�粓绉诲簱涓婃灦锛�鎴�鍏朵粬-寮傚父鐮�鍙嶉鐩稿叧缁撴灉鍘熷洜锛學MS鏍规嵁鎯呭喌澶勭悊 
+            /// 1-鍏ュ簱鏈夎揣 2-鍏ヨ繙杩戞湁璐�3-鍑哄簱鏃犺揣 4-鍑鸿繙杩戞湁璐�
+            /// </summary>
+            public string code { get; set; }
+            public string result { get; set; }
+            public string clientCode { get; set; }
+            public string reqTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+        }
+
+    }
+
+
+}
+
diff --git a/Dispatch/HostToAGV.cs b/Dispatch/HostToAGV.cs
new file mode 100644
index 0000000..1583115
--- /dev/null
+++ b/Dispatch/HostToAGV.cs
@@ -0,0 +1,550 @@
+锘�/------------------------------------------------------------------------------
+// <auto-generated>
+//     姝や唬鐮佺敱宸ュ叿鐢熸垚銆�+//     杩愯鏃剁増鏈�4.0.30319.42000
+//
+//     瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋�+//     閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便�
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Web.Services;
+using System.Web.Services.Protocols;
+using System.Xml.Serialization;
+
+// 
+// 姝ゆ簮浠g爜鐢�wsdl 鑷姩鐢熸垚, Version=4.6.1055.0銆�+// 
+
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+[System.Web.Services.WebServiceBindingAttribute(Name="HostToAGV", Namespace="http://127.0.0.1:9988/HostToAGV.wsdl")]
+public  class HostToAGV : System.Web.Services.Protocols.SoapHttpClientProtocol {
+    
+    private System.Threading.SendOrPostCallback StartNewOrderWithQCmdOperationCompleted;
+    
+    private System.Threading.SendOrPostCallback AddNewOrderOperationCompleted;
+    
+    private System.Threading.SendOrPostCallback CancelOrderOperationCompleted;
+    
+    private System.Threading.SendOrPostCallback ChangeOrderOperationCompleted;
+    
+    private System.Threading.SendOrPostCallback QueryOrderOperationCompleted;
+    
+    private System.Threading.SendOrPostCallback OrderAddOperationCompleted;
+    
+    private System.Threading.SendOrPostCallback OrderChangeParamOperationCompleted;
+    
+    /// <remarks/>
+    public HostToAGV() {
+        this.Url = "http://127.0.0.1:9988/HostToAGV.cgi";
+    }
+    
+    /// <remarks/>
+    public event StartNewOrderWithQCmdCompletedEventHandler StartNewOrderWithQCmdCompleted;
+    
+    /// <remarks/>
+    public event AddNewOrderCompletedEventHandler AddNewOrderCompleted;
+    
+    /// <remarks/>
+    public event CancelOrderCompletedEventHandler CancelOrderCompleted;
+    
+    /// <remarks/>
+    public event ChangeOrderCompletedEventHandler ChangeOrderCompleted;
+    
+    /// <remarks/>
+    public event QueryOrderCompletedEventHandler QueryOrderCompleted;
+    
+    /// <remarks/>
+    public event OrderAddCompletedEventHandler OrderAddCompleted;
+    
+    /// <remarks/>
+    public event OrderChangeParamCompletedEventHandler OrderChangeParamCompleted;
+    
+    /// <remarks/>
+    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="urn:HostToAGV", ResponseNamespace="urn:HostToAGV", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+    [return: System.Xml.Serialization.XmlElementAttribute("bufout", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
+    public string StartNewOrderWithQCmd([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)] string bufin) {
+        object[] results = this.Invoke("StartNewOrderWithQCmd", new object[] {
+                    bufin});
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public System.IAsyncResult BeginStartNewOrderWithQCmd(string bufin, System.AsyncCallback callback, object asyncState) {
+        return this.BeginInvoke("StartNewOrderWithQCmd", new object[] {
+                    bufin}, callback, asyncState);
+    }
+    
+    /// <remarks/>
+    public string EndStartNewOrderWithQCmd(System.IAsyncResult asyncResult) {
+        object[] results = this.EndInvoke(asyncResult);
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public void StartNewOrderWithQCmdAsync(string bufin) {
+        this.StartNewOrderWithQCmdAsync(bufin, null);
+    }
+    
+    /// <remarks/>
+    public void StartNewOrderWithQCmdAsync(string bufin, object userState) {
+        if ((this.StartNewOrderWithQCmdOperationCompleted == null)) {
+            this.StartNewOrderWithQCmdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnStartNewOrderWithQCmdOperationCompleted);
+        }
+        this.InvokeAsync("StartNewOrderWithQCmd", new object[] {
+                    bufin}, this.StartNewOrderWithQCmdOperationCompleted, userState);
+    }
+    
+    private void OnStartNewOrderWithQCmdOperationCompleted(object arg) {
+        if ((this.StartNewOrderWithQCmdCompleted != null)) {
+            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+            this.StartNewOrderWithQCmdCompleted(this, new StartNewOrderWithQCmdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+        }
+    }
+    
+    /// <remarks/>
+    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="urn:HostToAGV", ResponseNamespace="urn:HostToAGV", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+    [return: System.Xml.Serialization.XmlElementAttribute("bufout", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
+    public string AddNewOrder([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)] string bufin) {
+        object[] results = this.Invoke("AddNewOrder", new object[] {
+                    bufin});
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public System.IAsyncResult BeginAddNewOrder(string bufin, System.AsyncCallback callback, object asyncState) {
+        return this.BeginInvoke("AddNewOrder", new object[] {
+                    bufin}, callback, asyncState);
+    }
+    
+    /// <remarks/>
+    public string EndAddNewOrder(System.IAsyncResult asyncResult) {
+        object[] results = this.EndInvoke(asyncResult);
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public void AddNewOrderAsync(string bufin) {
+        this.AddNewOrderAsync(bufin, null);
+    }
+    
+    /// <remarks/>
+    public void AddNewOrderAsync(string bufin, object userState) {
+        if ((this.AddNewOrderOperationCompleted == null)) {
+            this.AddNewOrderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddNewOrderOperationCompleted);
+        }
+        this.InvokeAsync("AddNewOrder", new object[] {
+                    bufin}, this.AddNewOrderOperationCompleted, userState);
+    }
+    
+    private void OnAddNewOrderOperationCompleted(object arg) {
+        if ((this.AddNewOrderCompleted != null)) {
+            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+            this.AddNewOrderCompleted(this, new AddNewOrderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+        }
+    }
+    
+    /// <remarks/>
+    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="urn:HostToAGV", ResponseNamespace="urn:HostToAGV", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+    [return: System.Xml.Serialization.XmlElementAttribute("bufout", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
+    public string CancelOrder([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)] string bufin) {
+        object[] results = this.Invoke("CancelOrder", new object[] {
+                    bufin});
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public System.IAsyncResult BeginCancelOrder(string bufin, System.AsyncCallback callback, object asyncState) {
+        return this.BeginInvoke("CancelOrder", new object[] {
+                    bufin}, callback, asyncState);
+    }
+    
+    /// <remarks/>
+    public string EndCancelOrder(System.IAsyncResult asyncResult) {
+        object[] results = this.EndInvoke(asyncResult);
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public void CancelOrderAsync(string bufin) {
+        this.CancelOrderAsync(bufin, null);
+    }
+    
+    /// <remarks/>
+    public void CancelOrderAsync(string bufin, object userState) {
+        if ((this.CancelOrderOperationCompleted == null)) {
+            this.CancelOrderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelOrderOperationCompleted);
+        }
+        this.InvokeAsync("CancelOrder", new object[] {
+                    bufin}, this.CancelOrderOperationCompleted, userState);
+    }
+    
+    private void OnCancelOrderOperationCompleted(object arg) {
+        if ((this.CancelOrderCompleted != null)) {
+            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+            this.CancelOrderCompleted(this, new CancelOrderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+        }
+    }
+    
+    /// <remarks/>
+    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="urn:HostToAGV", ResponseNamespace="urn:HostToAGV", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+    [return: System.Xml.Serialization.XmlElementAttribute("bufout", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
+    public string ChangeOrder([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)] string bufin) {
+        object[] results = this.Invoke("ChangeOrder", new object[] {
+                    bufin});
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public System.IAsyncResult BeginChangeOrder(string bufin, System.AsyncCallback callback, object asyncState) {
+        return this.BeginInvoke("ChangeOrder", new object[] {
+                    bufin}, callback, asyncState);
+    }
+    
+    /// <remarks/>
+    public string EndChangeOrder(System.IAsyncResult asyncResult) {
+        object[] results = this.EndInvoke(asyncResult);
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public void ChangeOrderAsync(string bufin) {
+        this.ChangeOrderAsync(bufin, null);
+    }
+    
+    /// <remarks/>
+    public void ChangeOrderAsync(string bufin, object userState) {
+        if ((this.ChangeOrderOperationCompleted == null)) {
+            this.ChangeOrderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnChangeOrderOperationCompleted);
+        }
+        this.InvokeAsync("ChangeOrder", new object[] {
+                    bufin}, this.ChangeOrderOperationCompleted, userState);
+    }
+    
+    private void OnChangeOrderOperationCompleted(object arg) {
+        if ((this.ChangeOrderCompleted != null)) {
+            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+            this.ChangeOrderCompleted(this, new ChangeOrderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+        }
+    }
+    
+    /// <remarks/>
+    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="urn:HostToAGV", ResponseNamespace="urn:HostToAGV", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+    [return: System.Xml.Serialization.XmlElementAttribute("bufout", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
+    public string QueryOrder([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)] string bufin) {
+        object[] results = this.Invoke("QueryOrder", new object[] {
+                    bufin});
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public System.IAsyncResult BeginQueryOrder(string bufin, System.AsyncCallback callback, object asyncState) {
+        return this.BeginInvoke("QueryOrder", new object[] {
+                    bufin}, callback, asyncState);
+    }
+    
+    /// <remarks/>
+    public string EndQueryOrder(System.IAsyncResult asyncResult) {
+        object[] results = this.EndInvoke(asyncResult);
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public void QueryOrderAsync(string bufin) {
+        this.QueryOrderAsync(bufin, null);
+    }
+    
+    /// <remarks/>
+    public void QueryOrderAsync(string bufin, object userState) {
+        if ((this.QueryOrderOperationCompleted == null)) {
+            this.QueryOrderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnQueryOrderOperationCompleted);
+        }
+        this.InvokeAsync("QueryOrder", new object[] {
+                    bufin}, this.QueryOrderOperationCompleted, userState);
+    }
+    
+    private void OnQueryOrderOperationCompleted(object arg) {
+        if ((this.QueryOrderCompleted != null)) {
+            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+            this.QueryOrderCompleted(this, new QueryOrderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+        }
+    }
+    
+    /// <remarks/>
+    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestElementName="Order-Add", RequestNamespace="urn:HostToAGV", ResponseElementName="Order-AddResponse", ResponseNamespace="urn:HostToAGV", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+    [return: System.Xml.Serialization.XmlElementAttribute("pszResponse", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
+    public string OrderAdd([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)] string pszRequest) {
+        object[] results = this.Invoke("OrderAdd", new object[] {
+                    pszRequest});
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public System.IAsyncResult BeginOrderAdd(string pszRequest, System.AsyncCallback callback, object asyncState) {
+        return this.BeginInvoke("OrderAdd", new object[] {
+                    pszRequest}, callback, asyncState);
+    }
+    
+    /// <remarks/>
+    public string EndOrderAdd(System.IAsyncResult asyncResult) {
+        object[] results = this.EndInvoke(asyncResult);
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public void OrderAddAsync(string pszRequest) {
+        this.OrderAddAsync(pszRequest, null);
+    }
+    
+    /// <remarks/>
+    public void OrderAddAsync(string pszRequest, object userState) {
+        if ((this.OrderAddOperationCompleted == null)) {
+            this.OrderAddOperationCompleted = new System.Threading.SendOrPostCallback(this.OnOrderAddOperationCompleted);
+        }
+        this.InvokeAsync("OrderAdd", new object[] {
+                    pszRequest}, this.OrderAddOperationCompleted, userState);
+    }
+    
+    private void OnOrderAddOperationCompleted(object arg) {
+        if ((this.OrderAddCompleted != null)) {
+            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+            this.OrderAddCompleted(this, new OrderAddCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+        }
+    }
+    
+    /// <remarks/>
+    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestElementName="Order-ChangeParam", RequestNamespace="urn:HostToAGV", ResponseElementName="Order-ChangeParamResponse", ResponseNamespace="urn:HostToAGV", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+    [return: System.Xml.Serialization.XmlElementAttribute("pszResponse", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
+    public string OrderChangeParam([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)] string pszRequest) {
+        object[] results = this.Invoke("OrderChangeParam", new object[] {
+                    pszRequest});
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public System.IAsyncResult BeginOrderChangeParam(string pszRequest, System.AsyncCallback callback, object asyncState) {
+        return this.BeginInvoke("OrderChangeParam", new object[] {
+                    pszRequest}, callback, asyncState);
+    }
+    
+    /// <remarks/>
+    public string EndOrderChangeParam(System.IAsyncResult asyncResult) {
+        object[] results = this.EndInvoke(asyncResult);
+        return ((string)(results[0]));
+    }
+    
+    /// <remarks/>
+    public void OrderChangeParamAsync(string pszRequest) {
+        this.OrderChangeParamAsync(pszRequest, null);
+    }
+    
+    /// <remarks/>
+    public void OrderChangeParamAsync(string pszRequest, object userState) {
+        if ((this.OrderChangeParamOperationCompleted == null)) {
+            this.OrderChangeParamOperationCompleted = new System.Threading.SendOrPostCallback(this.OnOrderChangeParamOperationCompleted);
+        }
+        this.InvokeAsync("OrderChangeParam", new object[] {
+                    pszRequest}, this.OrderChangeParamOperationCompleted, userState);
+    }
+    
+    private void OnOrderChangeParamOperationCompleted(object arg) {
+        if ((this.OrderChangeParamCompleted != null)) {
+            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+            this.OrderChangeParamCompleted(this, new OrderChangeParamCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+        }
+    }
+    
+    /// <remarks/>
+    public new void CancelAsync(object userState) {
+        base.CancelAsync(userState);
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+public delegate void StartNewOrderWithQCmdCompletedEventHandler(object sender, StartNewOrderWithQCmdCompletedEventArgs e);
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+public  class StartNewOrderWithQCmdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+    
+    private object[] results;
+    
+    internal StartNewOrderWithQCmdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+            base(exception, cancelled, userState) {
+        this.results = results;
+    }
+    
+    /// <remarks/>
+    public string Result {
+        get {
+            this.RaiseExceptionIfNecessary();
+            return ((string)(this.results[0]));
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+public delegate void AddNewOrderCompletedEventHandler(object sender, AddNewOrderCompletedEventArgs e);
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+public  class AddNewOrderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+    
+    private object[] results;
+    
+    internal AddNewOrderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+            base(exception, cancelled, userState) {
+        this.results = results;
+    }
+    
+    /// <remarks/>
+    public string Result {
+        get {
+            this.RaiseExceptionIfNecessary();
+            return ((string)(this.results[0]));
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+public delegate void CancelOrderCompletedEventHandler(object sender, CancelOrderCompletedEventArgs e);
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+public  class CancelOrderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+    
+    private object[] results;
+    
+    internal CancelOrderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+            base(exception, cancelled, userState) {
+        this.results = results;
+    }
+    
+    /// <remarks/>
+    public string Result {
+        get {
+            this.RaiseExceptionIfNecessary();
+            return ((string)(this.results[0]));
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+public delegate void ChangeOrderCompletedEventHandler(object sender, ChangeOrderCompletedEventArgs e);
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+public  class ChangeOrderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+    
+    private object[] results;
+    
+    internal ChangeOrderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+            base(exception, cancelled, userState) {
+        this.results = results;
+    }
+    
+    /// <remarks/>
+    public string Result {
+        get {
+            this.RaiseExceptionIfNecessary();
+            return ((string)(this.results[0]));
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+public delegate void QueryOrderCompletedEventHandler(object sender, QueryOrderCompletedEventArgs e);
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+public  class QueryOrderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+    
+    private object[] results;
+    
+    internal QueryOrderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+            base(exception, cancelled, userState) {
+        this.results = results;
+    }
+    
+    /// <remarks/>
+    public string Result {
+        get {
+            this.RaiseExceptionIfNecessary();
+            return ((string)(this.results[0]));
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+public delegate void OrderAddCompletedEventHandler(object sender, OrderAddCompletedEventArgs e);
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+public  class OrderAddCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+    
+    private object[] results;
+    
+    internal OrderAddCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+            base(exception, cancelled, userState) {
+        this.results = results;
+    }
+    
+    /// <remarks/>
+    public string Result {
+        get {
+            this.RaiseExceptionIfNecessary();
+            return ((string)(this.results[0]));
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+public delegate void OrderChangeParamCompletedEventHandler(object sender, OrderChangeParamCompletedEventArgs e);
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+public  class OrderChangeParamCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+    
+    private object[] results;
+    
+    internal OrderChangeParamCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+            base(exception, cancelled, userState) {
+        this.results = results;
+    }
+    
+    /// <remarks/>
+    public string Result {
+        get {
+            this.RaiseExceptionIfNecessary();
+            return ((string)(this.results[0]));
+        }
+    }
+}
diff --git a/Dispatch/NDC.cs b/Dispatch/NDC.cs
new file mode 100644
index 0000000..26f3b8c
--- /dev/null
+++ b/Dispatch/NDC.cs
@@ -0,0 +1,165 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Xml;
+
+using Newtonsoft.Json;
+
+namespace HH.WCS.Mobox3.AnGang.Dispatch {
+    public class NDC
+    {
+        private static HostToAGV callClient = null;
+        static NDC() {
+            callClient = new HostToAGV();
+            //callClient.Url = Settings.Config.HostToAgvServerUrl;
+            
+            callClient.Url = string.Empty;
+        }
+        private static string GetReqStrNew(int ts, int pri, string taskNo, Dictionary<string, string> param) {
+            /*<Req>
+              <Order TS='5' Pri='80' No='666' NoCallback='0' Ext1='' Ext2='' Ext3=''>
+                <Param Name='From' Value='10' />
+                <Param Name='To' Value='20' />
+                <Param Name='Func' Value='1' />
+                <Param Name='Data' Value='7' />
+                <Param Name='ItemHeight' Value='1' />
+                <Param Name='CntrType' Value='12' />
+                <Param Name='FromCol' Value='2' />
+                <Param Name='ToCol' Value='111' />
+              </Order>
+            </Req>*/
+            var sb = new StringBuilder();
+            sb.Append($"<Req><Order TS='{ts}' Pri='{pri}' No='{taskNo}'>");
+
+            foreach (var kv in param) {
+                sb.Append($"<Param Name='{kv.Key}' Value='{kv.Value}'/>");
+            }
+            sb.Append("</Order></Req>");
+            return sb.ToString();
+        }
+        public AGVResult AddNewOrderNew(int ts, int pri, string taskNo, Dictionary<string, string> param) {
+            //< Req >< Order TS = '1' Pri = '1' No = 'TN2302020001' Ext1 = '' Ext2 = '' N_CNTR_COUNT = '' >< Param Name = 'From' Value = '2' />< Param Name = 'To' Value = '1' /></ Order ></ Req >
+
+            var bufin = GetReqStrNew(ts, pri, taskNo, param);
+
+            try {
+
+                var result = callClient.OrderAdd(bufin);
+                LogHelper.Info($"浠诲姟涓嬪彂缁撴灉 OrderAdd req={bufin} res={result}", "NDC");
+                Console.WriteLine($"浠诲姟涓嬪彂缁撴灉 OrderAdd req={bufin} res={result}");
+                //LogHelper.Info(result.bufout, "ts");
+                return GetResult(result);
+            }
+            catch (Exception e) {
+                LogHelper.Info($"浠诲姟涓嬪彂澶辫触 OrderAdd req={bufin} res={e.Message}", "NDC");
+                //Console.WriteLine($"浠诲姟涓嬪彂澶辫触 AddNewOrder req={bufin} res={e.Message}");
+                return new AGVResult { Res = new Res { ErrCode = -1, ErrInfo = e.Message } };
+            }
+
+        }
+        private static string GetReqStr(int ts, Dictionary<string, string> param) {
+            //< Order  TS = '60'  Pri = '" + mst.CN_N_PRIORITY.ToString() + "' From = '" + start.CN_N_AGV_TN_Location + "' To = '" + end.CN_N_AGV_TN_Location + "'  No = '" + mst.S_CODE + "_1' Ext1 = '1' Ext2 = '" + Constants.TN_MID_COMMANDEQ_CALLAGVOrderCommandType + "'  N_CNTR_COUNT = ''   FRow = '" + sFloor + "'  TRow = '" + eFloor + "' />
+            var sb = new StringBuilder();
+            sb.Append($"<Req><Order ");
+            if (ts != 0) {
+                sb.Append($"TS='{ts}'");
+            }
+            foreach (var kv in param) {
+                sb.Append($" {kv.Key}='{kv.Value}'");
+            }
+            sb.Append("/></Req>");
+            return sb.ToString();
+        }
+        public static AGVResult AddNewOrder(int ts, Dictionary<string, string> param) 
+        {
+            //< Req >< Order TS = '1' Pri = '1' No = 'TN2302020001' Ext1 = '' Ext2 = '' N_CNTR_COUNT = '' >< Param Name = 'From' Value = '2' />< Param Name = 'To' Value = '1' /></ Order ></ Req >
+
+            var bufin = GetReqStr(ts, param);
+
+            try {
+
+                var result = callClient.AddNewOrder(bufin);
+                LogHelper.Info($"AddNewOrder req={bufin} res={result}", "NDC");
+                return GetResult(result);
+            }
+            catch (Exception e) {
+                LogHelper.Info($"AddNewOrder req={bufin} res={e.Message}", "NDC");
+                return new AGVResult { Res = new Res { ErrCode = -1, ErrInfo = e.Message } };
+            }
+
+        }
+        public static AGVResult CancelOrder(int ts, Dictionary<string, string> param) {
+            //< Req >< Order No = 'TN2302020001' >< Param Name = 'IsForce' Value = '1' /></ Order ></ Req >
+            var bufin = GetReqStr(ts, param);
+            try {
+                var result = callClient.CancelOrder(bufin);
+                LogHelper.Info($"CancelOrder req={bufin} res={result}", "NDC");
+                return GetResult(result);
+            }
+            catch (Exception e) {
+                LogHelper.Info($"CancelOrder req={bufin} res={e.Message}", "NDC");
+                return new AGVResult {
+                    Res = new Res {
+                        ErrCode = -1,
+                        ErrInfo = e.Message
+                    }
+                };
+            }
+
+        }
+        public static AGVResult StartNewOrderWithQCmd(int ts, Dictionary<string, string> param) {
+            //lpn:      <Order TS='41' Pri='' ExtDeviceNo='{0}' CtrlVal='{1}' DispInfo='{2}' No='{3}' Ext1='' Ext2='' N_CNTR_COUNT='' />
+            //traccif:  <Order TS='164' From='2' To='2' ExtDeviceNo='" + lockNo + "' No='" + DateTime.Now.Ticks.ToString() + "' />
+            //lock:     <Order TS='170'  CtrlVal='" + CtrlVal + "' ExtDeviceNo='" + roadway + "' No='" + DateTime.Now.Ticks.ToString() + "' />
+            var bufin = GetReqStr(ts, param);
+            try {
+                var r = callClient.StartNewOrderWithQCmd(bufin);
+                LogHelper.Info($"StartNewOrderWithQCmd req={bufin} res={r}", "NDC");
+                return GetResult(r);
+            }
+            catch (Exception e) {
+                LogHelper.Info($"StartNewOrderWithQCmd req={bufin} res={e.Message}", "NDC");
+                return new AGVResult {
+                    Res = new Res {
+                        ErrCode = -1,
+                        ErrInfo = e.Message
+                    }
+                };
+            }
+        }
+        public static AGVResult ChangeOrder(Dictionary<string, string> param) {
+            //< Req >< Order No = 'TN2302020002' ParamNo = '18' Param1 = '12' /></ Req >
+            var bufin = GetReqStr(0, param);
+            try {
+                var r = callClient.ChangeOrder(bufin);
+                LogHelper.Info($"ChangeOrder req={bufin} res={r}", "NDC");
+                return GetResult(r);
+            }
+            catch (Exception e) {
+                LogHelper.Info($"ChangeOrder req={bufin} res={e.Message}", "NDC");
+                return new AGVResult {
+                    Res = new Res {
+                        ErrCode = -1,
+                        ErrInfo = e.Message
+                    }
+                };
+            }
+        }
+        private static AGVResult GetResult(string bufout) {
+            //<Res><ErrCode>0</ErrCode><Result>11</Result></Res>
+            XmlDocument xml = new XmlDocument();
+            xml.LoadXml(bufout);
+            var json = JsonConvert.SerializeXmlNode(xml);
+            return JsonConvert.DeserializeObject<AGVResult>(json);
+        }
+        public class AGVResult
+        {
+            public Res Res { get; set; }
+        }
+        public class Res
+        {
+            public int ErrCode { get; set; }
+            public string ErrInfo { get; set; }
+        }
+    }
+}
diff --git a/Dispatch/NDCApi.cs b/Dispatch/NDCApi.cs
new file mode 100644
index 0000000..59aab7d
--- /dev/null
+++ b/Dispatch/NDCApi.cs
@@ -0,0 +1,271 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+using HH.WCS.Mobox3.AnGang.AppStart;
+using HH.WCS.Mobox3.AnGang.config;
+
+using Newtonsoft.Json;
+
+namespace HH.WCS.Mobox3.AnGang.Dispatch {
+    public class NDCApi
+    {
+        public static string NDCApiUrl { set; get; }
+        static NDCApi()
+        {
+
+            NDCApiUrl = Settings.Config.NDCApiUrl;
+        }
+
+
+        public static AgvApiResult AddOrderNew(int ts, int pri, string taskNo, List<param> param)
+        {
+            var httpH = new HttpHelper();
+            var agvApiResult = new AgvApiResult();
+            var model = new AddOrderNewModel();
+            model.ts_no = ts;
+            model.pri = pri;
+            model.task_no = taskNo;
+            model.param = param;
+            try
+            {
+                string jsonInfo = JsonConvert.SerializeObject(model);
+                LogHelper.Info($"浠诲姟{taskNo}涓嬪彂锛寋jsonInfo}", "NDC");
+                var result = httpH.WebPost(NDCApiUrl + "Add", jsonInfo);
+                LogHelper.Info($"浠诲姟涓嬪彂缁撴灉res={result}", "NDC");
+                agvApiResult = JsonConvert.DeserializeObject<AgvApiResult>(result);
+                return agvApiResult;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"浠诲姟涓嬪彂澶辫触 res={e.Message}", "NDC");
+                agvApiResult.err_code = -1;
+                agvApiResult.err_msg = e.Message;
+                return agvApiResult;
+            }
+        }
+
+        public static AgvApiResult AddOrderNew(AddOrderNewModel model)
+        {
+            var httpH = new HttpHelper();
+            var agvApiResult = new AgvApiResult();
+
+            try
+            {
+                string jsonInfo = JsonConvert.SerializeObject(model);
+                LogHelper.Info($"浠诲姟{model.task_no}涓嬪彂锛寋jsonInfo}", "NDC");
+
+                var result = httpH.WebPost(NDCApiUrl + "Add", jsonInfo);
+                LogHelper.Info($"浠诲姟涓嬪彂缁撴灉res={result}", "NDC");
+
+                agvApiResult = JsonConvert.DeserializeObject<AgvApiResult>(result);
+                return agvApiResult;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"浠诲姟涓嬪彂澶辫触 res={e.Message}", "NDC");
+                agvApiResult.err_code = -1;
+                agvApiResult.err_msg = e.Message;
+                return agvApiResult;
+            }
+        }
+
+        public static AgvApiResult CancelOrder(string tsNo, bool is_force = true)
+        {
+            var httpH = new HttpHelper();
+            var agvApiResult = new AgvApiResult();
+            var model = new CancelOrderModel();
+            model.task_no = tsNo;
+            model.is_force = is_force;
+            try
+            {
+                string jsonInfo = JsonConvert.SerializeObject(model);
+                LogHelper.Info($"浠诲姟{model.task_no}鍙栨秷锛寋jsonInfo}", "NDC");
+
+                var result = httpH.WebPost(NDCApiUrl + "Cancel", jsonInfo);
+                LogHelper.Info($"浠诲姟{model.task_no}鍙栨秷缁撴灉={result}", "NDC");
+
+                agvApiResult = JsonConvert.DeserializeObject<AgvApiResult>(result);
+                return agvApiResult;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"CancelOrder  res={e.Message}", "NDC");
+                agvApiResult.err_code = -1;
+                agvApiResult.err_msg = e.Message;
+                return agvApiResult;
+            }
+        }
+
+        public static AgvApiResult CancelOrder(CancelOrderModel model)
+        {
+            var httpH = new HttpHelper();
+            var agvApiResult = new AgvApiResult();
+            try
+            {
+                string jsonInfo = JsonConvert.SerializeObject(model);
+                LogHelper.Info($"浠诲姟{model.task_no}鍙栨秷锛寋jsonInfo}", "NDC");
+
+                var result = httpH.WebPost(NDCApiUrl + "Cancel", jsonInfo);
+                LogHelper.Info($"浠诲姟{model.task_no}鍙栨秷缁撴灉={result}", "NDC");
+
+                agvApiResult = JsonConvert.DeserializeObject<AgvApiResult>(result);
+                return agvApiResult;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"CancelOrder  res={e.Message}", "NDC");
+                agvApiResult.err_code = -1;
+                agvApiResult.err_msg = e.Message;
+                return agvApiResult;
+            }
+
+        }
+
+        public static AgvApiResult ChangeOrderPri(string taskNo, int newPri)
+        {
+            var httpH = new HttpHelper();
+            var agvApiResult = new AgvApiResult();
+            var model = new ChangePriModel();
+            model.task_no = taskNo;
+            model.pri = newPri;
+            try
+            {
+                string jsonInfo = JsonConvert.SerializeObject(model);
+                LogHelper.Info($"浠诲姟{model.task_no}浼樺厛绾ф洿鏀癸紝{jsonInfo}", "NDC");
+
+                var result = httpH.WebPost(NDCApiUrl + "ChangePri", jsonInfo);
+                LogHelper.Info($"浠诲姟{model.task_no}浼樺厛绾ф洿鏀圭粨鏋�{result}", "NDC");
+
+                agvApiResult = JsonConvert.DeserializeObject<AgvApiResult>(result);
+                return agvApiResult;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"ChangeOrderPri res={e.Message}", "NDC");
+                agvApiResult.err_code = -1;
+                agvApiResult.err_msg = e.Message;
+                return agvApiResult;
+            }
+        }
+
+        public static AgvApiResult ChangeOrderPri(ChangePriModel model)
+        {
+            var httpH = new HttpHelper();
+            var agvApiResult = new AgvApiResult();
+            try
+            {
+                string jsonInfo = JsonConvert.SerializeObject(model);
+                LogHelper.Info($"浠诲姟{model.task_no}浼樺厛绾ф洿鏀癸紝{jsonInfo}", "NDC");
+
+                var result = httpH.WebPost(NDCApiUrl + "ChangePri", jsonInfo);
+                LogHelper.Info($"浠诲姟{model.task_no}浼樺厛绾ф洿鏀圭粨鏋�{result}", "NDC");
+
+                agvApiResult = JsonConvert.DeserializeObject<AgvApiResult>(result);
+                return agvApiResult;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"ChangeOrderPri res={e.Message}", "NDC");
+                agvApiResult.err_code = -1;
+                agvApiResult.err_msg = e.Message;
+                return agvApiResult;
+            }
+        }
+
+        public static AgvApiResult ChangeOrderParam(string taskNo, int paramNo, string paramStr)
+        {
+            var httpH = new HttpHelper();
+            var agvApiResult = new AgvApiResult();
+            var model = new ChangeParamModel();
+            model.task_no = taskNo;
+            model.param_no = paramNo;
+            model.param = paramStr;
+            try
+            {
+                string jsonInfo = JsonConvert.SerializeObject(model);
+                LogHelper.Info($"浠诲姟{model.task_no}鍙傛暟鏇存敼锛寋jsonInfo}", "NDC");
+
+                var result = httpH.WebPost(NDCApiUrl + "ChangeParam", jsonInfo);
+                LogHelper.Info($"浠诲姟{model.task_no}鍙傛暟鏇存敼缁撴灉={result}", "NDC");
+
+                agvApiResult = JsonConvert.DeserializeObject<AgvApiResult>(result);
+                return agvApiResult;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"ChangeOrderParam res={e.Message}", "NDC");
+                agvApiResult.err_code = -1;
+                agvApiResult.err_msg = e.Message;
+                return agvApiResult;
+            }
+        }
+
+        public static AgvApiResult ChangeOrderParam(ChangeParamModel model)
+        {
+            var httpH = new HttpHelper();
+            var agvApiResult = new AgvApiResult();
+            try
+            {
+                string jsonInfo = JsonConvert.SerializeObject(model);
+                LogHelper.Info($"浠诲姟{model.task_no}鍙傛暟鏇存敼锛寋jsonInfo}", "NDC");
+
+                var result = httpH.WebPost(NDCApiUrl + "ChangeParam", jsonInfo);
+                LogHelper.Info($"浠诲姟{model.task_no}鍙傛暟鏇存敼缁撴灉={result}", "NDC");
+
+                agvApiResult = JsonConvert.DeserializeObject<AgvApiResult>(result);
+                return agvApiResult;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"ChangeOrderParam res={e.Message}", "NDC");
+                agvApiResult.err_code = -1;
+                agvApiResult.err_msg = e.Message;
+                return agvApiResult;
+            }
+        }
+    }
+
+    /// <summary>
+    /// 杩斿洖淇℃伅Model
+    /// </summary>
+    public class AgvApiResult
+    {
+        public int err_code { set; get; }//寮傚父鐮侊細0 - 姝e父锛屽叾瀹冨�涓哄紓甯搁敊璇爜
+        public string err_msg { set; get; }//杩斿洖鐨勯敊璇弿杩帮紝鍦�err_code <> 0 鏃惰繑鍥�+        public object result { set; get; }//姝g‘杩斿洖鐨勭粨鏋滃唴瀹癸紝鍦�err_code = 0 涓旀湁杩斿洖鍐呭鏃�+    }
+
+    public class AddOrderNewModel
+    {
+        public int ts_no { set; get; }//TS 鍙凤紝蹇呴』鏈夊�	
+        public int pri { set; get; }//浼樺厛绾�+        public string task_no { set; get; }//涓婃父浠诲姟缂栫爜锛屽鏋�no_feedback = 1 鏃讹紝鍙互涓虹┖
+        public List<param> param { set; get; } = new List<param>();//鍙傛暟鍒楄〃
+    }
+
+
+    public class param
+    {
+        public string name { set; get; }//鍙傛暟鍚�+        public string value { set; get; }//鍙傛暟鍊�+    }
+
+    public class CancelOrderModel
+    {
+        public string task_no { set; get; }//涓婃父浠诲姟缂栫爜
+        public bool is_force { set; get; } = true;//鏄惁寮哄埗鍙栨秷锛� 鈥�寮哄埗
+    }
+
+    public class ChangeParamModel
+    {
+        public string task_no { set; get; }//涓婃父浠诲姟缂栫爜
+        public int param_no { set; get; }//鍙傛暟鍙�+        public string param { set; get; }//鍙傛暟鍐呭锛屽涓弬鏁颁互鑻辨枃鍒嗗彿(;)鍒嗛殧
+    }
+
+    public class ChangePriModel
+    {
+        public string task_no { set; get; }//涓婃父浠诲姟缂栫爜
+        public int pri { set; get; }//鏂颁紭鍏堢骇
+    }
+}
diff --git a/Dispatch/NDCHelper.cs b/Dispatch/NDCHelper.cs
new file mode 100644
index 0000000..3cd639b
--- /dev/null
+++ b/Dispatch/NDCHelper.cs
@@ -0,0 +1,81 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HH.WCS.Mobox3.AnGang.Dispatch
+{
+    public class NDCHelper
+    {
+        public static void Test() {
+            //dic.Add("Ext1", ""); dic.Add("Ext2", ""); dic.Add("N_CNTR_COUNT", "");
+            //var r = callClient.AddNewOrderAsync(new AddNewOrderRequest() { bufin = "<Req><Order Pri='1' TS='1' From='1' To='2' No='123471118_1'  Ext1='1' Ext2='CALLADDAGV'  N_CNTR_COUNT='' /></Req>" });
+            //r.Wait();
+
+            var dic = new Dictionary<string, string>();
+            dic.Add("Pri", "1"); dic.Add("From", "1"); dic.Add("To", "1"); dic.Add("No", "12311411718_2");// dic.Add("Ext1", "1"); dic.Add("Ext2", "CALLADDAGV"); dic.Add("N_CNTR_COUNT", "");
+            var result = NDC.AddNewOrder(1, dic);
+
+            var dic1 = new Dictionary<string, string>();
+            var no = "3454566666";
+            dic1.Add("From", "1"); dic1.Add("To", "0"); dic1.Add("No", no);
+            result = NDC.AddNewOrder(101, dic1);
+
+            var dic2 = new Dictionary<string, string>();
+            dic2.Add("ExtDeviceNo", "1"); dic2.Add("From", "2"); dic2.Add("To", "2"); dic2.Add("No", DateTime.Now.Ticks.ToString()); dic2.Add("CtrlVal", "1");
+            result = NDC.AddNewOrder(39, dic2);
+
+            var dic3 = new Dictionary<string, string>();
+            dic3.Add("From", "1"); dic3.Add("To", "9"); dic3.Add("No", no);
+            result = NDC.CancelOrder(101, dic3);
+
+            var dic4 = new Dictionary<string, string>();
+            dic4.Add("ExtDeviceNo", "1"); dic4.Add("CtrlVal", "1"); dic4.Add("DispInfo", "AAAAAAAA"); dic4.Add("No", DateTime.Now.Ticks.ToString());
+            result = NDC.StartNewOrderWithQCmd(41, dic4);
+
+            var dic5 = new Dictionary<string, string>();
+            dic5.Add("ExtDeviceNo", "1"); dic5.Add("CtrlVal", "1"); dic5.Add("No", DateTime.Now.Ticks.ToString());
+            result = NDC.StartNewOrderWithQCmd(170, dic5);
+
+            var dic6 = new Dictionary<string, string>();
+            dic6.Add("ExtDeviceNo", "11"); dic6.Add("From", "2"); dic6.Add("To", "2"); dic6.Add("No", DateTime.Now.Ticks.ToString());
+            result = NDC.StartNewOrderWithQCmd(164, dic6);
+
+            var dic7 = new Dictionary<string, string>();
+            dic7.Add("Param1", "50"); dic7.Add("No", DateTime.Now.Ticks.ToString());
+            result = NDC.ChangeOrder(dic7);
+        }
+
+        public static bool ChangeParam(string taskNo, int param1, int paramNo = 0) {
+            bool bResult = false;
+            var dic = new Dictionary<string, string>();
+            dic.Add("No", taskNo);
+            if (paramNo >= 0) {
+                dic.Add("ParamNo", paramNo.ToString());
+            }
+            dic.Add("Param1", param1.ToString());
+            var result = NDC.ChangeOrder(dic);
+            return bResult;
+        }
+
+        public static bool Traffic(string lockNo) {
+            bool bResult = false;
+            var dic = new Dictionary<string, string>();
+            dic.Add("ExtDeviceNo", lockNo);
+            dic.Add("From", "2");
+            dic.Add("To", "2"); dic.Add("No", DateTime.Now.Ticks.ToString());
+
+            var result = NDC.StartNewOrderWithQCmd(164, dic);
+            return bResult;
+        }
+
+        public static bool Cancel(string taskNo) {
+            bool bResult = false;
+            var dic = new Dictionary<string, string>();
+            dic.Add("No", taskNo);
+            dic.Add("IsForce", "1");
+
+            var result = NDC.CancelOrder(1, dic);
+            return bResult;
+        }
+    }
+}
diff --git a/Dtos/Request/AgvRequest.cs b/Dtos/Request/AgvRequest.cs
new file mode 100644
index 0000000..c8fb4f5
--- /dev/null
+++ b/Dtos/Request/AgvRequest.cs
@@ -0,0 +1,39 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Dtos.Request {
+    public class AgvRequest {
+        /// <summary>
+        /// hosttoagv涓婃姤浠诲姟鐘舵�
+        /// </summary>
+        public class AgvTaskState {
+            public int state { get; set; }
+            public string task_no { get; set; }
+            public string forklift_no { get; set; }
+
+            /// <summary>
+            /// 瀹夊叏闂ㄧ紪鍙�+            /// </summary>
+            public string lock_no { get; set; }
+            public string ext_data { get; set; }
+        }
+
+        public class SafetyInteractionInfo {
+            public int station_id { get; set; }
+
+            /// <summary>
+            /// 璇锋眰涓婄嚎/涓嬬嚎鐨勭殑绔欏彴搴撲綅鍚嶇О锛屼緥濡倃ork6銆亀ork8
+            /// </summary>
+            public string station_name { get; set; }
+
+            /// <summary>
+            /// 璇锋眰鐮�+            /// </summary>
+            public string apply_code { get; set; }
+            public string task_no { set; get; }
+        }
+    }
+}
diff --git a/Dtos/Request/MoboxRequest.cs b/Dtos/Request/MoboxRequest.cs
new file mode 100644
index 0000000..4b910e6
--- /dev/null
+++ b/Dtos/Request/MoboxRequest.cs
@@ -0,0 +1,355 @@
+锘縰sing Newtonsoft.Json;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Dtos.Request {
+    public class MoboxRequest {
+
+        #region 妯℃澘鏁版嵁绫�+
+        /// <summary>
+        /// 妯℃澘鏁版嵁绫伙細鏍囧噯鍑哄叆搴撲俊鎭�+        /// </summary>
+        public class BaseBoundInfo {
+            /// <summary>
+            /// 璧风偣璐т綅
+            /// </summary>
+            public string startLoc { get; set; }
+            /// <summary>
+            /// 瀹瑰櫒鍙�+            /// </summary>
+            public string cntId { get; set; }
+            /// <summary>
+            /// 缁堢偣璐т綅
+            /// </summary>
+            public string endLoc { get; set; }
+        }
+
+        #endregion
+        public class InWarehouseInfo {
+            /// <summary>
+            /// 璧风偣璐т綅
+            /// </summary>
+            [JsonProperty("StartLoc")]
+            public string startLoc { get; set; }
+
+            /// <summary>
+            /// 缁堢偣璐ф灦锛堝彲閫夛級
+            /// </summary>
+            [JsonProperty("Nrow")]
+            public string endShelf { get; set; }
+        }
+
+        public class SelectLocationInfo {
+            public string forklift_no { get; set; }
+
+            ///// <summary>
+            ///// 浠诲姟鍙�+            ///// </summary>
+            //public string taskNo { get; set; }
+
+            public string endLoc { get; set; }
+        }
+
+        /// <summary>
+        /// 浜у搧閮ㄥ垎鍥炲簱淇℃伅
+        /// </summary>
+        public class PartInWarehouseInfo {
+            /// <summary>
+            /// 璧风偣浣嶇疆
+            /// </summary>
+            public string startLoc { get; set; }
+
+            /// <summary>
+            /// 缁堢偣浣嶇疆
+            /// </summary>
+            public string endLoc { get; set; }
+        }
+
+        /// <summary>
+        /// 浜у搧閮ㄥ垎鍑哄簱淇℃伅
+        /// </summary>
+        public class PartOutWarehouseInfo {
+            /// <summary>
+            /// 璧风偣浣嶇疆
+            /// </summary>
+            public string startLoc { get; set; }
+
+            /// <summary>
+            /// 缁堢偣浣嶇疆
+            /// </summary>
+            public string endLoc { get; set; }
+        }
+
+        /// <summary>
+        /// 鐩樼偣鐞嗚揣鍑哄簱淇℃伅
+        /// </summary>
+        public class CheckOutWarehouseInfo {
+            /// <summary>
+            /// 璧风偣浣嶇疆
+            /// </summary>
+            public string startLoc { get; set; }
+
+            /// <summary>
+            /// 缁堢偣浣嶇疆
+            /// </summary>
+            public string endLoc { get; set; }
+        }
+
+        /// <summary>
+        /// 鐩樼偣鐞嗚揣鍥炲簱淇℃伅
+        /// </summary>
+        public class CheckInWarehouseInfo {
+            /// <summary>
+            /// 璧风偣浣嶇疆
+            /// </summary>
+            public string startLoc { get; set; }
+
+            /// <summary>
+            /// 缁堢偣浣嶇疆
+            /// </summary>
+            public string endLoc { get; set; }
+        }
+
+        // ERP -> AGV
+
+        /// <summary>
+        /// 鍏ュ簱鏁版嵁鍚屾淇℃伅
+        /// </summary>
+        public class InWarehouseDataSyncInfo {
+            /// <summary>
+            /// 搴撳瓨鏄庣粏锛堝垪琛級
+            /// </summary>
+            public List<StockTransaction> stockTransactions { get; set; }
+
+            /// <summary>
+            /// 鎬昏褰曟暟
+            /// </summary>
+            public string totalRecords { get; set; }
+
+            /// <summary>
+            /// 鏁版嵁鐢熸垚鏃堕棿鎴�+            /// </summary>
+            public string timestamp { get; set; }
+        }
+
+        /// <summary>
+        /// 搴撳瓨鏄庣粏淇℃伅
+        /// </summary>
+        public class StockTransaction {
+            /// <summary>
+            /// 鍌ㄤ綅鐮�+            /// </summary>
+            public string locationCode { get; set; }
+
+            /// <summary>
+            /// 搴撳瓨鏄庣粏浜ゆ槗鍙�+            /// </summary>
+            public string stockTransactionId { get; set; }
+
+            /// <summary>
+            /// 鐗╂枡缂栫爜
+            /// </summary>
+            public string itemCode { get; set; }
+
+            /// <summary>
+            /// 鐗╂枡鍚嶇О
+            /// </summary>
+            public string itemName { get; set; }
+
+            /// <summary>
+            /// 鐗╂枡鐭弿杩�+            /// </summary>
+            public string itemShortDesc { get; set; }
+
+            /// <summary>
+            /// 搴撳瓨鏁伴噺
+            /// </summary>
+            public string stockQuantity { get; set; }
+
+            /// <summary>
+            /// 鍏ュ簱鏁伴噺
+            /// </summary>
+            public string inQuantity { get; set; }
+
+            /// <summary>
+            /// 搴撳瓨鎬讳环
+            /// </summary>
+            public string totalPrice { get; set; }
+
+            /// <summary>
+            /// 鍏ュ簱鏃堕棿
+            /// </summary>
+            public string stockInTime { get; set; }
+
+            /// <summary>
+            /// 淇濈鍛�+            /// </summary>
+            public string storeKeeper { get; set; }
+
+            /// <summary>
+            /// 浜х嚎閮ㄩ棬浠g爜
+            /// </summary>
+            public string lineCode { get; set; }
+
+            /// <summary>
+            /// 閫佽揣鍗曡鍙�+            /// </summary>
+            public string deliveryItemNo { get; set; }
+
+            /// <summary>
+            /// 渚涘簲鍟嗗悕绉�+            /// </summary>
+            public string supplierName { get; set; }
+
+            /// <summary>
+            /// 搴撳瓨璐d换浜哄鍚�+            /// </summary>
+            public string inventoryManager { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁1
+            /// </summary>
+            public string ext1 { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁2
+            /// </summary>
+            public string ext2 { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁3
+            /// </summary>
+            public string ext3 { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁4
+            /// </summary>
+            public string ext4 { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁5
+            /// </summary>
+            public string ext5 { get; set; }
+        }
+
+        /// <summary>
+        /// 鍑哄簱鍙戞枡鍚屾淇℃伅
+        /// </summary>
+        public class OutWarehouseDataSyncInfo {
+            /// <summary>
+            /// 鍙戞枡璁板綍鏄庣粏鍒楄〃
+            /// </summary>
+            public List<MaterialIssue> materialIssues { get; set; }
+
+            /// <summary>
+            /// 鎬昏褰曟暟
+            /// </summary>
+            public string totalRecords { get; set; }
+
+            /// <summary>
+            /// 鏁版嵁鐢熸垚鏃堕棿鎴�+            /// </summary>
+            public string timestamp { get; set; }
+        }
+
+        /// <summary>
+        /// 鍙戞枡璁板綍鏄庣粏淇℃伅
+        /// </summary>
+        public class MaterialIssue {
+            /// <summary>
+            /// 鍌ㄤ綅鐮�+            /// </summary>
+            public string locationCode { get; set; }
+
+            /// <summary>
+            /// 棰嗙敤鍗曞彿
+            /// </summary>
+            public string withdrawalOrderNo { get; set; }
+
+            /// <summary>
+            /// 鐗╂枡缂栫爜
+            /// </summary>
+            public string itemCode { get; set; }
+
+            /// <summary>
+            /// 鐗╂枡鍚嶇О
+            /// </summary>
+            public string itemName { get; set; }
+
+            /// <summary>
+            /// 鐗╂枡鐭弿杩�+            /// </summary>
+            public string itemShortDesc { get; set; }
+
+            /// <summary>
+            /// 瀹炲彂鏁伴噺
+            /// </summary>
+            public string actualIssuedQty { get; set; }
+
+            /// <summary>
+            /// 瀹炲彂閲戦
+            /// </summary>
+            public string issuedAmount { get; set; }
+
+            /// <summary>
+            /// 渚涘簲鍟嗗悕绉�+            /// </summary>
+            public string supplierName { get; set; }
+
+            /// <summary>
+            /// 瀹炲彂浜�+            /// </summary>
+            public string issuer { get; set; }
+
+            /// <summary>
+            /// 鍙戞枡鏃ユ湡
+            /// </summary>
+            public string issueDate { get; set; }
+
+            /// <summary>
+            /// 淇濈鍛�+            /// </summary>
+            public string storeKeeper { get; set; }
+
+            /// <summary>
+            /// 浜х嚎閮ㄩ棬浠g爜
+            /// </summary>
+            public string lineCode { get; set; }
+
+            /// <summary>
+            /// 鎵规
+            /// </summary>
+            public string batchNo { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁1
+            /// </summary>
+            public string ext1 { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁2
+            /// </summary>
+            public string ext2 { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁3
+            /// </summary>
+            public string ext3 { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁4
+            /// </summary>
+            public string ext4 { get; set; }
+
+            /// <summary>
+            /// 澶囩敤瀛楁5
+            /// </summary>
+            public string ext5 { get; set; }
+        }
+    }
+}
diff --git a/Dtos/Response/AgvResponse.cs b/Dtos/Response/AgvResponse.cs
new file mode 100644
index 0000000..474dbce
--- /dev/null
+++ b/Dtos/Response/AgvResponse.cs
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Dtos.Response {
+    public class AgvResponse {
+        /// <summary>
+        /// 杩斿洖缁檋osttoagv
+        /// </summary>
+        public class ReturnResult {
+            public int ResultCode { get; set; }
+            public string ResultMsg { get; set; }
+        }
+
+    }
+}
diff --git a/Dtos/Response/MoboxResponse.cs b/Dtos/Response/MoboxResponse.cs
new file mode 100644
index 0000000..84e4822
--- /dev/null
+++ b/Dtos/Response/MoboxResponse.cs
@@ -0,0 +1,21 @@
+锘縰sing System.Collections.Generic;
+
+using Newtonsoft.Json;
+
+namespace HH.WCS.Mobox3.AnGang.Dtos.Response {
+    public class MoboxResponse {
+        /// <summary>
+        /// Mobox 鎺ュ彛杩斿洖
+        /// </summary>
+        public class SimpleResult {
+            [JsonProperty("resultCode")]
+            public int Code { get; set; }
+
+            [JsonProperty("resultMsg")]
+            public string Message { get; set; }
+
+            [JsonProperty("result")]
+            public List<object> Results { get; set; } = new List<object>();
+        }
+    }
+}
diff --git a/HH.WCS.Mobox3.AnGang.csproj b/HH.WCS.Mobox3.AnGang.csproj
new file mode 100644
index 0000000..40bcc8a
--- /dev/null
+++ b/HH.WCS.Mobox3.AnGang.csproj
@@ -0,0 +1,306 @@
+锘�?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{EBE15A59-A43A-43BE-8B4B-A6EC42E11DF6}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>HH.WCS.Mobox3.AnGang</RootNamespace>
+    <AssemblyName>HH.WCS.Mobox3.AnGang</AssemblyName>
+    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <TargetFrameworkProfile />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <DocumentationFile>bin\Debug\HH.WCS.Mobox3.AnGang.xml</DocumentationFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoWarn>$(NoWarn);CS1591</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject>HH.WCS.Mobox3.AnGang.Program</StartupObject>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
+      <HintPath>packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll</HintPath>
+    </Reference>
+    <Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
+      <HintPath>packages\BouncyCastle.Cryptography.2.4.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
+    </Reference>
+    <Reference Include="EasyModbus, Version=5.6.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>packages\EasyModbusTCP.5.6.0\lib\net40\EasyModbus.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Bcl.HashCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.Bcl.HashCode.1.1.1\lib\net461\Microsoft.Bcl.HashCode.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=3.1.32.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.Extensions.Logging.Abstractions.3.1.32\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Owin, Version=4.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Owin.4.2.2\lib\net45\Microsoft.Owin.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Owin.Host.HttpListener.4.2.2\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Owin.Hosting, Version=4.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Owin.Hosting.4.2.2\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Web.Infrastructure, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
+    </Reference>
+    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</HintPath>
+    </Reference>
+    <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
+      <HintPath>packages\NLog.5.3.4\lib\net46\NLog.dll</HintPath>
+    </Reference>
+    <Reference Include="Opc.Ua.Client, Version=1.5.374.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8, processorArchitecture=MSIL">
+      <HintPath>packages\OPCFoundation.NetStandard.Opc.Ua.Client.1.5.374.126\lib\netstandard2.0\Opc.Ua.Client.dll</HintPath>
+    </Reference>
+    <Reference Include="Opc.Ua.Configuration, Version=1.5.374.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8, processorArchitecture=MSIL">
+      <HintPath>packages\OPCFoundation.NetStandard.Opc.Ua.Configuration.1.5.374.126\lib\netstandard2.0\Opc.Ua.Configuration.dll</HintPath>
+    </Reference>
+    <Reference Include="Opc.Ua.Core, Version=1.5.374.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8, processorArchitecture=MSIL">
+      <HintPath>packages\OPCFoundation.NetStandard.Opc.Ua.Core.1.5.374.126\lib\netstandard2.0\Opc.Ua.Core.dll</HintPath>
+    </Reference>
+    <Reference Include="Opc.Ua.Gds.Client.Common, Version=1.5.374.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8, processorArchitecture=MSIL">
+      <HintPath>packages\OPCFoundation.NetStandard.Opc.Ua.Gds.Client.Common.1.5.374.126\lib\netstandard2.0\Opc.Ua.Gds.Client.Common.dll</HintPath>
+    </Reference>
+    <Reference Include="Opc.Ua.Gds.Server.Common, Version=1.5.374.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8, processorArchitecture=MSIL">
+      <HintPath>packages\OPCFoundation.NetStandard.Opc.Ua.Gds.Server.Common.1.5.374.126\lib\netstandard2.0\Opc.Ua.Gds.Server.Common.dll</HintPath>
+    </Reference>
+    <Reference Include="Opc.Ua.Security.Certificates, Version=1.5.374.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8, processorArchitecture=MSIL">
+      <HintPath>packages\OPCFoundation.NetStandard.Opc.Ua.Security.Certificates.1.5.374.126\lib\netstandard2.0\Opc.Ua.Security.Certificates.dll</HintPath>
+    </Reference>
+    <Reference Include="Opc.Ua.Server, Version=1.5.374.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8, processorArchitecture=MSIL">
+      <HintPath>packages\OPCFoundation.NetStandard.Opc.Ua.Server.1.5.374.126\lib\netstandard2.0\Opc.Ua.Server.dll</HintPath>
+    </Reference>
+    <Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
+      <HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
+    </Reference>
+    <Reference Include="S7.Net, Version=0.20.0.0, Culture=neutral, PublicKeyToken=d5812d469e84c693, processorArchitecture=MSIL">
+      <HintPath>..\packages\S7netplus.0.20.0\lib\net452\S7.Net.dll</HintPath>
+    </Reference>
+    <Reference Include="SqlSugar, Version=5.1.4.168, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>packages\SqlSugar.5.1.4.169\lib\SqlSugar.dll</HintPath>
+    </Reference>
+    <Reference Include="Swashbuckle.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd1bb07a5ac7c7bc, processorArchitecture=MSIL">
+      <HintPath>..\packages\Swashbuckle.Core.5.6.0\lib\net40\Swashbuckle.Core.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ComponentModel.Composition" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Configuration.Install" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Diagnostics.DiagnosticSource, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Diagnostics.DiagnosticSource.6.0.1\lib\net461\System.Diagnostics.DiagnosticSource.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Formats.Asn1, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Formats.Asn1.8.0.1\lib\net462\System.Formats.Asn1.dll</HintPath>
+    </Reference>
+    <Reference Include="System.IdentityModel" />
+    <Reference Include="System.IO.Compression" />
+    <Reference Include="System.Management" />
+    <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Net.Http.Formatting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ServiceModel" />
+    <Reference Include="System.ServiceModel.Primitives, Version=4.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>packages\System.ServiceModel.Primitives.4.10.0\lib\net461\System.ServiceModel.Primitives.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ServiceProcess" />
+    <Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Web" />
+    <Reference Include="System.Web.Http, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.AspNet.WebApi.Core.5.3.0\lib\net45\System.Web.Http.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Web.Http.Owin, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.AspNet.WebApi.Owin.5.3.0\lib\net45\System.Web.Http.Owin.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Web.Http.WebHost, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.AspNet.WebApi.WebHost.5.3.0\lib\net45\System.Web.Http.WebHost.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Web.Services" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Topshelf, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b800c4cfcdeea87b, processorArchitecture=MSIL">
+      <HintPath>..\packages\Topshelf.4.3.0\lib\net452\Topshelf.dll</HintPath>
+    </Reference>
+    <Reference Include="Topshelf.NLog, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b800c4cfcdeea87b, processorArchitecture=MSIL">
+      <HintPath>..\packages\Topshelf.NLog.4.3.0\lib\net452\Topshelf.NLog.dll</HintPath>
+    </Reference>
+    <Reference Include="WebActivatorEx, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL">
+      <HintPath>packages\WebActivatorEx.2.2.0\lib\net40\WebActivatorEx.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AppStart\Config.cs" />
+    <Compile Include="Consts\AgvStateCode.cs" />
+    <Compile Include="Consts\AgvStateName.cs" />
+    <Compile Include="Consts\AreaCode.cs" />
+    <Compile Include="Consts\AreaName.cs" />
+    <Compile Include="Consts\LockStateCode.cs" />
+    <Compile Include="Consts\LockStateName.cs" />
+    <Compile Include="Consts\TaskName.cs" />
+    <Compile Include="Controllers\DebugController.cs" />
+    <Compile Include="Controllers\ErpController.cs" />
+    <Compile Include="Controllers\MoboxController.cs" />
+    <Compile Include="Controllers\AgvController.cs" />
+    <Compile Include="Controllers\ApiModel.cs" />
+    <Compile Include="AppStart\SwaggerControllerDescProvider.cs" />
+    <Compile Include="Helpers\DbHelper.cs" />
+    <Compile Include="Helpers\ResultHelper.cs" />
+    <Compile Include="ServiceCore\WMSCore.cs" />
+    <Compile Include="Models\BaseModel.cs" />
+    <Compile Include="Services\DebugService.cs" />
+    <Compile Include="Devices\ModbusHelper.cs" />
+    <Compile Include="Devices\OpcUaHelper.cs" />
+    <Compile Include="Devices\PlcHelper.cs" />
+    <Compile Include="Devices\S7Helper.cs" />
+    <Compile Include="Devices\ScanCodeHelper.cs" />
+    <Compile Include="Devices\TcpClient.cs" />
+    <Compile Include="Devices\TcpServer.cs" />
+    <Compile Include="Dispatch\GZRobot.cs" />
+    <Compile Include="Dispatch\HanAo.cs" />
+    <Compile Include="Dispatch\NDC.cs" />
+    <Compile Include="ServiceCore\Monitor.cs" />
+    <Compile Include="Dispatch\NDCApi.cs" />
+    <Compile Include="Dtos\Request\AgvRequest.cs" />
+    <Compile Include="Dtos\Request\MoboxRequest.cs" />
+    <Compile Include="Dtos\Response\AgvResponse.cs" />
+    <Compile Include="Dtos\Response\MoboxResponse.cs" />
+    <Compile Include="Models\TN_CG_Detail.cs" />
+    <Compile Include="Models\TN_CAR_IN.cs" />
+    <Compile Include="Models\TN_Container.cs" />
+    <Compile Include="Models\TN_Location.cs" />
+    <Compile Include="Models\TN_Loc_Container.cs" />
+    <Compile Include="Models\TN_WorkOrder.cs" />
+    <Compile Include="Models\TN_Task.cs" />
+    <Compile Include="Models\TN_Task_Action.cs" />
+    <Compile Include="Helpers\DeviceProcess.cs" />
+    <Compile Include="ServiceCore\WCSCore.cs" />
+    <Compile Include="Controllers\WmsController.cs" />
+    <Compile Include="Dispatch\HostToAGV.cs" />
+    <Compile Include="Helpers\TaskHelper.cs" />
+    <Compile Include="Services\AgvService.cs" />
+    <Compile Include="Services\MoboxService.cs" />
+    <Compile Include="Helpers\LogHelper.cs" />
+    <Compile Include="Helpers\ContainerHelper.cs" />
+    <Compile Include="Helpers\LocationHelper.cs" />
+    <Compile Include="Helpers\WMSHelper.cs" />
+    <Compile Include="Helpers\SYSHelper.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="AppStart\Settings.cs" />
+    <Compile Include="AppStart\Startup.cs" />
+    <Compile Include="Dispatch\NDCHelper.cs" />
+    <Compile Include="Helpers\HttpHelper.cs" />
+    <Compile Include="Helpers\WCSHelper.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include=".editorconfig" />
+    <None Include="App.config" />
+    <None Include="config\config.json">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="swagger.js">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.6.2">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4.6.2 %28x86 鍜�x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/HH.WCS.Mobox3.AnGang.sln b/HH.WCS.Mobox3.AnGang.sln
new file mode 100644
index 0000000..a3bc908
--- /dev/null
+++ b/HH.WCS.Mobox3.AnGang.sln
@@ -0,0 +1,30 @@
+锘�+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.33205.214
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HH.WCS.Mobox3.AnGang", "HH.WCS.Mobox3.AnGang.csproj", "{EBE15A59-A43A-43BE-8B4B-A6EC42E11DF6}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2B600D60-6469-4E6C-9692-C01E7A42018E}"
+	ProjectSection(SolutionItems) = preProject
+		.editorconfig = .editorconfig
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{EBE15A59-A43A-43BE-8B4B-A6EC42E11DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EBE15A59-A43A-43BE-8B4B-A6EC42E11DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EBE15A59-A43A-43BE-8B4B-A6EC42E11DF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EBE15A59-A43A-43BE-8B4B-A6EC42E11DF6}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {8F82F32F-C59B-4BE6-A074-82CC2830FE2E}
+	EndGlobalSection
+EndGlobal
diff --git a/Helpers/ContainerHelper.cs b/Helpers/ContainerHelper.cs
new file mode 100644
index 0000000..bd914e6
--- /dev/null
+++ b/Helpers/ContainerHelper.cs
@@ -0,0 +1,143 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.config;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using static HH.WCS.Mobox3.AnGang.Dispatch.NDC;
+using HH.WCS.Mobox3.AnGang.Helpers;
+
+namespace HH.WCS.Mobox3.AnGang.Helper {
+    /// <summary>
+    /// 瀹瑰櫒甯姪绫�+    /// </summary>
+    internal class ContainerHelper 
+    {
+        /// <summary>
+        /// 瀹瑰櫒缁戝畾璐у搧
+        /// </summary>
+        /// <param name="cnt"></param>
+        /// <param name="cGs"></param>
+        /// <returns></returns>
+        public static string BindingCG(string cnt, List<string> cGs)
+        {
+            var db = DbHelper.GetDbClient();
+            var logs = $"瀹瑰櫒锛歿cnt}锛岃揣鍝侊細{JsonConvert.SerializeObject(cGs)}";
+            try
+            {
+                var cntCgList = db.Queryable<TN_CG_Detail>().Where(a => cGs.Contains(a.S_CG_ID) && a.S_CNTR_CODE == cnt).ToList();
+
+                if (cntCgList.Count > 0)
+                {
+                    cGs = cGs.Except(cntCgList.Select(a => a.S_CNTR_CODE).ToList()).ToList();
+                }
+
+                var bindCntCgList = new List<TN_CG_Detail>();
+                foreach (var item in cGs)
+                {
+                    bindCntCgList.Add(new TN_CG_Detail() { S_CNTR_CODE = cnt, S_CG_ID = item });
+                }
+
+                var log = JsonConvert.SerializeObject(bindCntCgList);
+                if (db.Insertable<TN_CG_Detail>(bindCntCgList).ExecuteCommand() > 0)
+                {
+                    LogHelper.Info($"鎻掑叆瀹瑰櫒璐у搧鍏崇郴琛ㄦ垚鍔燂紝{log}");
+                }
+                else
+                {
+                    LogHelper.Info($"鎻掑叆瀹瑰櫒璐у搧鍏崇郴琛ㄥけ璐ワ紝{log}");
+                    return "瀹瑰櫒缁戝畾璐у搧澶辫触锛� + logs;
+                }
+
+                var cntid = db.Queryable<TN_Container>().First(a => a.S_CODE == cnt);
+
+                if (cntid != null)
+                {
+                    cntid.T_MODIFY = System.DateTime.Now;
+                    log = JsonConvert.SerializeObject(cntid);
+                    if (db.Updateable(cntid).UpdateColumns(it => new { it.T_MODIFY }).ExecuteCommand() > 0)
+                    {
+                        LogHelper.Info($"鏇存柊瀹瑰櫒琛ㄦ垚鍔燂紝{log}");
+                    }
+                    else
+                    {
+                        LogHelper.Info($"鏇存柊瀹瑰櫒琛ㄥけ璐ワ紝{log}");
+                        return "瀹瑰櫒缁戝畾璐у搧澶辫触锛� + logs;
+                    }
+                }
+                else
+                {
+                    LogHelper.Info($"鍦ㄦ暟鎹簱涓湭鎵惧埌璇ュ鍣紝鏃犻渶鏇存柊锛屽鍣細{cnt}");
+                }
+                return "瀹瑰櫒缁戝畾璐у搧鎴愬姛锛� + logs;
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"鍙戠敓浜嗗紓甯革紝璐т綅缁戝畾瀹瑰櫒澶辫触锛�);
+                return "瀹瑰櫒缁戝畾璐у搧澶辫触锛� + ex.Message;
+            }
+        }
+
+        /// <summary>
+        /// 瀹瑰櫒瑙g粦璐у搧
+        /// </summary>
+        /// <param name="cnt"></param>
+        /// <param name="cGs"></param>
+        /// <returns></returns>
+        public static string UnBindingCG(string cnt, List<string> cGs)
+        {
+            var db = DbHelper.GetDbClient();
+            var logs = $"瀹瑰櫒锛歿cnt}锛岃揣鍝侊細{JsonConvert.SerializeObject(cGs)}";
+            try
+            {
+                var cntCgList = db.Queryable<TN_CG_Detail>().Where(a => cGs.Contains(a.S_CG_ID) && a.S_CNTR_CODE == cnt).ToList();
+                if (cntCgList.Count == 0)
+                {
+                    LogHelper.Info($"瀹瑰櫒鏃犻渶瑙g粦璐у搧锛屽湪鏁版嵁搴撲腑鏈壘鍒皗JsonConvert.SerializeObject(cGs)}鐩稿叧鐨勫鍣ㄨ揣鍝佸叧绯昏〃淇℃伅");
+                    return "瀹瑰櫒鏃犻渶瑙g粦璐у搧锛岃В缁戞垚鍔� + logs;
+                }
+                cGs = cntCgList.Select(a => a.S_CG_ID).ToList();
+
+                var log = JsonConvert.SerializeObject(cGs);
+                if (db.Deleteable<TN_CG_Detail>().Where(it => cGs.Contains(it.S_CG_ID) && it.S_CNTR_CODE == cnt).ExecuteCommand() > 0)
+                {
+                    LogHelper.Info($"鍒犻櫎瀹瑰櫒璐у搧鍏崇郴琛ㄦ垚鍔燂紝{log}");
+                }
+                else
+                {
+                    LogHelper.Info($"鍒犻櫎瀹瑰櫒璐у搧鍏崇郴琛ㄥけ璐ワ紝{log}");
+                    return "瀹瑰櫒缁戝畾璐у搧澶辫触锛� + logs;
+                }
+
+                var CntId = db.Queryable<TN_Container>().First(a => a.S_CODE == cnt);
+                if (CntId != null)
+                {
+                    CntId.T_MODIFY = System.DateTime.Now;
+                    log = JsonConvert.SerializeObject(CntId);
+                    if (db.Updateable(CntId).UpdateColumns(it => new { it.T_MODIFY }).ExecuteCommand() > 0)
+                    {
+                        LogHelper.Info($"鏇存柊瀹瑰櫒琛ㄦ垚鍔燂紝{log}");
+                    }
+                    else
+                    {
+                        LogHelper.Info($"鏇存柊瀹瑰櫒琛ㄥけ璐ワ紝{log}");
+                        return "瀹瑰櫒缁戝畾璐у搧澶辫触锛� + logs;
+                    }
+
+                }
+                else
+                {
+                    LogHelper.Info($"鍦ㄦ暟鎹簱涓湭鎵惧埌璇ュ鍣紝鏃犻渶鏇存柊锛屽鍣細{cnt}");
+                }
+                return "瀹瑰櫒瑙g粦璐у搧鎴愬姛锛� + logs;
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"鍙戠敓浜嗗紓甯革紝璐т綅瑙g粦瀹瑰櫒澶辫触锛寋ex.Message}");
+                return "瀹瑰櫒瑙g粦璐у搧澶辫触锛� + logs;
+            }
+        }
+    }
+}
diff --git a/Helpers/DbHelper.cs b/Helpers/DbHelper.cs
new file mode 100644
index 0000000..ec0607c
--- /dev/null
+++ b/Helpers/DbHelper.cs
@@ -0,0 +1,133 @@
+锘縰sing System;
+using System.Linq;
+
+using HH.WCS.Mobox3.AnGang.AppStart;
+
+using SqlSugar;
+
+using Task = System.Threading.Tasks.Task;
+
+namespace HH.WCS.Mobox3.AnGang.Helpers {
+    // SqlSugar 鏁欑▼锛歨ttps://www.donet5.com/Home/Doc
+
+    /// <summary>
+    /// 鏁版嵁搴撳府鍔╃被锛氬寘鎷崟渚嬫ā寮忓拰鍒涘缓鏂拌繛鎺ョ殑鏂规硶
+    /// </summary>
+    public static class DbHelper {
+        private static readonly SqlSugarScope _sqlSugar;
+
+        static DbHelper() {
+            _sqlSugar = new SqlSugarScope(new ConnectionConfig() {
+                ConnectionString = Settings.Config.SqlServer,
+                DbType = DbType.SqlServer,
+                IsAutoCloseConnection = true,
+                InitKeyType = InitKeyType.Attribute // 浠庣壒鎬ц鍙栦富閿嚜澧炰俊鎭�+            },
+            db => {
+                // 鐩戞帶鎵�湁瓒呰繃1绉掔殑Sql
+                db.Aop.OnLogExecuted = (sql, p) =>
+                {
+                    // 鎵ц鏃堕棿瓒呰繃1绉�+                    if (db.Ado.SqlExecutionTime.TotalSeconds > 1) {
+                        Console.WriteLine(sql + "\r\n" + db.Utilities.SerializeObject(p.ToDictionary(it => it.ParameterName, it => it.Value)));
+                        // 浠g爜CS鏂囦欢鍚�+                        var fileName = db.Ado.SqlStackTrace.FirstFileName;
+                        // 浠g爜琛屾暟
+                        var fileLine = db.Ado.SqlStackTrace.FirstLine;
+                        // 鏂规硶鍚�+                        var FirstMethodName = db.Ado.SqlStackTrace.FirstMethodName;
+                    }
+                    // 鐩稿綋浜嶦F鐨�PrintToMiniProfiler
+                };
+
+                // 姣忔璁剧疆鏁板�鏃堕兘鍘婚櫎鍓嶅鍚庡绌烘牸
+                db.Aop.DataExecuted = (value, entity) => {
+                    entity.EntityColumnInfos.ToList().ForEach(a => {
+                        var pvalue = entity.GetValue(a.PropertyName);
+                        if (pvalue != null && pvalue.GetType() == typeof(String)) {
+                            entity.SetValue(a.PropertyName, pvalue.ToString().Trim());
+                        }
+                    });
+                };
+
+                // 閰嶇疆AOP鏃ュ織
+                //db.Aop.OnLogExecuting = (sql, pars) =>
+                //{
+                //    Console.WriteLine(sql); // 杈撳嚭绾疭QL璇彞
+                //};
+
+                // 姣廚灏忔椂娓呯悊涓�缂撳瓨
+                Task.Run(async () => {
+                    while (true) {
+                        await Task.Delay(TimeSpan.FromHours(2));
+                        db.QueryFilter.Clear();
+                    }
+                });
+            });
+        }
+
+        /// <summary>
+        /// 鑾峰彇鐢ㄤ簬鎿嶆帶鏁版嵁搴撶殑 SqlSugarClient 瀵硅薄
+        /// </summary>
+        /// <returns></returns>
+        public static SqlSugarScope GetDbClient() {
+            return _sqlSugar;
+        }
+
+        /// <summary>
+        /// 鐢熸垚鐢ㄤ簬鎿嶆帶鏁版嵁搴撶殑 SqlSugarClient 瀵硅薄
+        /// </summary>
+        /// <remarks>
+        /// 濡傛灉鐢�Oracle 鏁版嵁闇�鍖�Oracle.ManagedDataAccess/21.15.0锛岀幆澧�netframework 4.62锛屽お鏂颁簡 4.8 鏈夌殑鏈嶅姟鍣ㄥ畨瑁呬笉涓婂幓
+        /// </remarks>
+        /// <param name="url"></param>
+        /// <returns></returns>
+        public static SqlSugarClient NewDbClient(string url = "") {
+            // 鍒涘缓鏁版嵁搴撳璞�+            SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() {
+                ConnectionString = string.IsNullOrEmpty(url) ? Settings.Config.SqlServer : url,
+                DbType = DbType.SqlServer,
+                IsAutoCloseConnection = true,
+                InitKeyType = InitKeyType.Attribute // 浠庣壒鎬ц鍙栦富閿嚜澧炰俊鎭�+            });
+
+            // 鐩戞帶鎵�湁瓒呰繃1绉掔殑Sql
+            db.Aop.OnLogExecuted = (sql, p) => {
+                // 鎵ц鏃堕棿瓒呰繃1绉�+                if (db.Ado.SqlExecutionTime.TotalSeconds > 1) {
+                    Console.WriteLine(sql + "\r\n" + db.Utilities.SerializeObject(p.ToDictionary(it => it.ParameterName, it => it.Value)));
+                    // 浠g爜CS鏂囦欢鍚�+                    var fileName = db.Ado.SqlStackTrace.FirstFileName;
+                    // 浠g爜琛屾暟
+                    var fileLine = db.Ado.SqlStackTrace.FirstLine;
+                    // 鏂规硶鍚�+                    var FirstMethodName = db.Ado.SqlStackTrace.FirstMethodName;
+                }
+                // 鐩稿綋浜嶦F鐨�PrintToMiniProfiler
+            };
+
+            // 姣忔璁剧疆鏁板�鏃堕兘鍘婚櫎鍓嶅鍚庡绌烘牸
+            db.Aop.DataExecuted = (value, entity) => {
+                entity.EntityColumnInfos.ToList().ForEach(a => {
+                    var pvalue = entity.GetValue(a.PropertyName);
+                    if (pvalue != null && pvalue.GetType() == typeof(String)) {
+                        entity.SetValue(a.PropertyName, pvalue.ToString().Trim());
+                    }
+                });
+            };
+
+            // 鎹浆鎹�(ExecuteCommand 鎵嶄細鎷︽埅锛屾煡璇笉琛�
+            //db.Aop.DataExecuting = (value, entity) => {
+            //    //var val=entity.EntityColumnInfo
+            //    Console.WriteLine(entity.EntityName);
+            //};
+
+            // 鐢ㄤ簬鎵撳嵃 SqlSugar 瑙g爜鍚庣殑 SQL 璇彞
+            db.Aop.OnLogExecuting = (sql, pars) => {
+                Console.WriteLine(sql);
+            };
+
+            return db;
+        }
+    }
+}
diff --git a/Helpers/DeviceProcess.cs b/Helpers/DeviceProcess.cs
new file mode 100644
index 0000000..431f9e4
--- /dev/null
+++ b/Helpers/DeviceProcess.cs
@@ -0,0 +1,28 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Devices;
+
+using HH.WCS.Mobox3.AnGang.Dispatch;
+using HH.WCS.Mobox3.AnGang.config;
+using HH.WCS.Mobox3.AnGang.Helper;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+
+namespace HH.WCS.Mobox3.AnGang.process
+{
+    /// <summary>
+    /// 璁惧淇″彿澶勭悊锛屼富瑕佹槸tcp淇″彿锛屾垜浠仛server琚姩鎺ユ敹淇″彿鏉ュ鐞嗭紝鏍规嵁椤圭洰瀹氬埗鐨�+    /// </summary>
+    internal class DeviceProcess
+    {
+        internal static void Analysis(string data, string ip) {
+            if (data.Length >= 6) {
+                //鍘绘帀娑堟伅澶�F 00
+                data = data.Substring(4);
+                //Console.WriteLine($"{ip}-{data}");
+            }
+        }
+
+        
+    }
+}
diff --git a/Helpers/HttpHelper.cs b/Helpers/HttpHelper.cs
new file mode 100644
index 0000000..9b6fc80
--- /dev/null
+++ b/Helpers/HttpHelper.cs
@@ -0,0 +1,286 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+
+namespace HH.WCS.Mobox3.AnGang.config {
+    public class HttpHelper {
+        public string WebPost(string url, string postData, string cotentType = "application/json")
+        {
+            Console.WriteLine(url);
+            WebRequest request = WebRequest.Create(url);
+            request.Method = "POST";
+            //string postData = JsonConvert.SerializeObject(data); ;
+            byte[] byteArray = Encoding.UTF8.GetBytes(postData);
+            request.ContentType = cotentType;
+            request.ContentLength = byteArray.Length;
+            request.Timeout = 3000;
+            StreamReader reader = null;
+            Stream dataStream = null;
+            WebResponse response = null;
+
+            try
+            {
+                dataStream = request.GetRequestStream();
+                dataStream.Write(byteArray, 0, byteArray.Length);
+                dataStream.Close();
+                response = request.GetResponse();
+                //Console.WriteLine(((HttpWebResponse)response).StatusDescription);
+                dataStream = response.GetResponseStream();
+                reader = new StreamReader(dataStream, Encoding.UTF8);
+                string responseFromServer = reader.ReadToEnd();
+                return responseFromServer;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"WebPost res={e.Message}", "API");
+                return "";
+            }
+            finally
+            {
+                // 閲婃斁璧勬簮
+                if (reader != null) reader.Close();
+                if (dataStream != null) dataStream.Close();
+                if (response != null) response.Close();
+            }
+        }
+
+        public string WebGet(string url) {
+            WebRequest request = WebRequest.Create(url);
+            request.Timeout = 6000;
+            request.Method = "GET";
+            StreamReader reader = null;
+            Stream dataStream = null;
+            WebResponse response = null;
+            try {
+                response = request.GetResponse();
+                dataStream = response.GetResponseStream();
+                reader = new StreamReader(dataStream);
+                string responseFromServer = reader.ReadToEnd();
+
+                Console.WriteLine(responseFromServer);
+                return responseFromServer;
+            }
+            catch (Exception e) {
+                LogHelper.Info($"WebGet res={e.Message}", "API");
+                return "";
+            }
+            finally
+            {
+                // 閲婃斁璧勬簮
+                if (reader != null) reader.Close();
+                if (dataStream != null) dataStream.Close();
+                if (response != null) response.Close();
+            }
+        }
+
+        public string Get(string url, string contentType = "application/x-www-form-urlencoded") {
+            WebRequest request = WebRequest.Create(url);
+            request.Method = "Get";
+            request.ContentType = contentType;
+            StreamReader reader = null;
+            Stream stream = null;
+            WebResponse rsp = null;
+            try {
+
+                rsp = request.GetResponse();
+                stream = rsp.GetResponseStream();
+                reader = new StreamReader(stream);
+                return reader.ReadToEnd();
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"Get res={e.Message}", "API");
+                return "";
+            }
+            finally {
+                // 閲婃斁璧勬簮
+                if (reader != null) reader.Close();
+                if (stream != null) stream.Close();
+                if (rsp != null) rsp.Close();
+            }
+
+        }
+
+        public string Post(string url, string postData, string contentType = "application/json", string sessionId = "") {
+            Console.WriteLine(url);
+            WebRequest request = WebRequest.Create(url);
+            request.Method = "POST";
+            byte[] byteArray = Encoding.UTF8.GetBytes(postData);
+            request.ContentType = contentType;
+            request.ContentLength = byteArray.Length;
+            request.Timeout = 3000;
+            if (sessionId != "") {
+                request.Headers.Set("ASP.NET_SessionId", sessionId);
+            }
+            StreamReader reader = null;
+            Stream stream = null;
+            WebResponse rsp = null;
+            try {
+                stream = request.GetRequestStream();
+                stream.Write(byteArray, 0, byteArray.Length);
+                stream.Close();
+                rsp = request.GetResponse();
+                stream = rsp.GetResponseStream();
+                reader = new StreamReader(stream);
+                return reader.ReadToEnd();
+            }
+            catch (Exception ex) {
+                LogHelper.Info($"Post res={ex.Message}", "API");
+                return "";
+            }
+            finally {
+                // 閲婃斁璧勬簮
+                if (reader != null) reader.Close();
+                if (stream != null) stream.Close();
+                if (rsp != null) rsp.Close();
+            }
+
+        }
+
+        public string Post(string url, Dictionary<string, string> dic) {
+            var param = dic.Select(a => { return string.Format("{0}={1}", a.Key, a.Value); }).ToList();
+            return Post(url, string.Join("&", param), "application/x-www-form-urlencoded");
+        }
+
+        public string PostWithCookie(string url, string sessinId) {
+            return PostWithCookie(url, "", "", sessinId);
+        }
+
+        public string PostWithCookie(string url, string postData, string contentType = "application/json", string sessionId = "") {
+            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
+            request.Method = "POST";
+            byte[] byteArray = Encoding.UTF8.GetBytes(postData);
+            request.ContentType = contentType;
+            request.ContentLength = byteArray.Length;
+            if (sessionId != "") {
+                request.CookieContainer = new CookieContainer();
+                request.CookieContainer.SetCookies(new Uri("http://" + request.RequestUri.Authority), "ASP.NET_SessionId=" + sessionId);
+            }
+            StreamReader reader = null;
+            Stream stream = null;
+            WebResponse rsp = null;
+            try {
+                stream = request.GetRequestStream();
+                stream.Write(byteArray, 0, byteArray.Length);
+                stream.Close();
+                rsp = request.GetResponse();
+                stream = rsp.GetResponseStream();
+                reader = new StreamReader(stream);
+                return reader.ReadToEnd();
+            }
+            catch (Exception e)
+            {
+
+                LogHelper.Info($"PostWithCookie res={e.Message}", "API");
+                return "";
+            }
+            finally {
+                // 閲婃斁璧勬簮
+                if (reader != null) reader.Close();
+                if (stream != null) stream.Close();
+                if (rsp != null) rsp.Close();
+            }
+
+        }
+
+        public string Put(string url, string postData, string contentType = "application/json", string sessionId = "")
+        {
+            WebRequest request = WebRequest.Create(url);
+            request.Method = "Put";
+            byte[] byteArray = Encoding.UTF8.GetBytes(postData);
+            request.ContentType = contentType;
+            request.ContentLength = byteArray.Length;
+            if (sessionId != "")
+            {
+                request.Headers.Set("ASP.NET_SessionId", sessionId);
+            }
+            StreamReader reader = null;
+            Stream stream = null;
+            WebResponse rsp = null;
+            try
+            {
+                stream = request.GetRequestStream();
+                stream.Write(byteArray, 0, byteArray.Length);
+                stream.Close();
+                rsp = request.GetResponse();
+                stream = rsp.GetResponseStream();
+                reader = new StreamReader(stream);
+                return reader.ReadToEnd();
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"Put res={e.Message}", "API");
+                return "";
+            }
+            finally
+            {
+                // 閲婃斁璧勬簮
+                if (reader != null) reader.Close();
+                if (stream != null) stream.Close();
+                if (rsp != null) rsp.Close();
+            }
+        }
+
+        public string WebPostWithMD5(string url, string postData, string contentType = "application/json")
+        {
+            // 鏂板鎺堟潈鍙傛暟
+            string appKey = ""; // 鍋囪閰嶇疆绫讳腑鏈堿ppKey鍜孉ppSecret
+            string appSecret = "";
+            string reqTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString();
+            string reqVerify = CalculateMD5Hash($"{appKey}{appSecret}{reqTime}");
+
+            WebRequest request = WebRequest.Create(url);
+            request.Method = "POST";
+            request.Headers.Add("AppKey", appKey);
+            request.Headers.Add("ReqTime", reqTime);
+            request.Headers.Add("ReqVerify", reqVerify);
+
+            byte[] byteArray = Encoding.UTF8.GetBytes(postData);
+            request.ContentType = contentType;
+            request.ContentLength = byteArray.Length;
+            request.Timeout = 3000;
+            StreamReader reader = null;
+            Stream dataStream = null;
+            WebResponse response = null;
+
+            try
+            {
+                dataStream = request.GetRequestStream();
+                dataStream.Write(byteArray, 0, byteArray.Length);
+                dataStream.Close();
+                response = request.GetResponse();
+                //Console.WriteLine(((HttpWebResponse)response).StatusDescription);
+                dataStream = response.GetResponseStream();
+                reader = new StreamReader(dataStream, Encoding.UTF8);
+                string responseFromServer = reader.ReadToEnd();
+                return responseFromServer;
+            }
+            catch (Exception e)
+            {
+                LogHelper.Info($"WebPost res={e.Message}", "API");
+                return "";
+            }
+            finally
+            {
+                // 閲婃斁璧勬簮
+                if (reader != null) reader.Close();
+                if (dataStream != null) dataStream.Close();
+                if (response != null) response.Close();
+            }
+        }
+
+        // MD5璁$畻杈呭姪鏂规硶
+        private static string CalculateMD5Hash(string input)
+        {
+            using (var md5 = System.Security.Cryptography.MD5.Create())
+            {
+                byte[] inputBytes = Encoding.UTF8.GetBytes(input);
+                byte[] hashBytes = md5.ComputeHash(inputBytes);
+                return BitConverter.ToString(hashBytes).Replace("-", "").ToLower();
+            }
+        }
+    }
+}
diff --git a/Helpers/LocationHelper.cs b/Helpers/LocationHelper.cs
new file mode 100644
index 0000000..27f7148
--- /dev/null
+++ b/Helpers/LocationHelper.cs
@@ -0,0 +1,548 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.config;
+using Newtonsoft.Json;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using static HH.WCS.Mobox3.AnGang.Controllers.ApiModel;
+using HH.WCS.Mobox3.AnGang.Helpers;
+
+namespace HH.WCS.Mobox3.AnGang.Helper {
+    public class LocationHelper
+    {
+        private static Dictionary<string, TN_Location> Locations = null;
+
+        static LocationHelper()
+        {
+            try
+            {
+                //鍒濆鍖朙ocation鍔犲叆鍒板瓧鍏哥紦瀛�+                Locations = new Dictionary<string, TN_Location>();
+                var list = GetAllLocList();
+                if (list.Count > 0)
+                {
+                    list.ForEach(a =>
+                    {
+                        if (!Locations.ContainsKey(a.S_CODE))
+                        {
+                            Locations.Add(a.S_CODE, a);
+                        }
+                    });
+                }
+                //鍒濆鍖朙ocationExt鍔犲叆鍒伴泦鍚堢紦瀛�+                //LocationExts = new Dictionary<string, LocationExt>();
+                //var exts = GetAllLocExtList();
+                //if (exts.Count > 0) {
+                //    exts.ForEach(a => {
+                //        LocationExts.Add($"{a.S_LOC_CODE.Trim()}_{a.S_PICKUP_POINT.Trim()}", a);
+                //    });
+                //}
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇鎵�湁璐т綅淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        internal static List<TN_Location> GetAllLocList()
+        {
+            var db = DbHelper.GetDbClient();
+            return db.Queryable<TN_Location>().ToList();
+        }
+
+
+        internal static TN_Location GetLocation(string loc)
+        {
+            if (Locations.Keys.Contains(loc))
+            {
+                return Locations[loc.Trim()];
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="loc"></param>
+        /// <returns></returns>
+        public static bool IsFree(TN_Location loc) {
+            return loc != null 
+                && loc.N_LOCK_STATE == 0 
+                && loc.S_LOCK_STATE == "鏃� 
+                && loc.C_ENABLE == "Y";
+        }
+
+        /// <summary>
+        /// 鑾峰彇璐т綅绔欑偣淇℃伅
+        /// </summary>
+        /// <param name="loc"></param>
+        /// <param name="isEmpty">鏄惁灞炰簬浜哄伐绌烘墭鍖哄埌绌烘墭缂撳瓨搴撳尯</param>
+        /// <returns></returns>
+        internal static string GetAgvSite(string loc, bool isEmpty = false)
+        {
+            var site = "0";
+            if (Locations.Keys.Contains(loc.Trim()) && !isEmpty)
+            {
+                var Location = Locations[loc.Trim()];
+                site = Location.S_AGV_SITE;
+            }
+            else
+            {
+                var Location = GetLoc(loc.Trim());
+                if (Location != null)
+                {
+                    site = Location.S_AGV_SITE;
+
+                    if (isEmpty)
+                    {
+                        if (Location.N_CURRENT_NUM == 0)
+                        {
+                            site = Location.S_AGV_SITE;
+                        }
+                        //if (Location.N_CURRENT_NUM == 1)
+                        //{
+                        //    site = Location.S_AGV_SITE2;
+                        //}
+                        //if (Location.N_CURRENT_NUM == 2)
+                        //{
+                        //    site = Location.S_AGV_SITE3;
+                        //}
+                        //if (Location.N_CURRENT_NUM == 3)
+                        //{
+                        //    site = Location.S_AGV_SITE4;
+                        //}
+                        //if (Location.N_CURRENT_NUM == 4)
+                        //{
+                        //    site = Location.S_AGV_SITE5;
+                        //}
+                    }
+                }
+            }
+            return site;
+        }
+
+        internal static TN_Location GetLoc(string code)
+        {
+            var db = DbHelper.GetDbClient();
+            return db.Queryable<TN_Location>().Where(a => a.S_CODE.Trim() == code).First();
+        }
+
+        /// <summary>
+        /// 鍏ュ簱閿佸畾缁堢偣锛屽嚭搴撻攣瀹氳捣鐐�+        /// 浣犲垱寤轰换鍔¢攣瀹氳揣浣嶇殑鏃跺�锛屾妸閿佺殑鏉ユ簮灏辨槸浠诲姟鍙蜂篃鍐欎笂鍘伙紙鍔犻攣鐨勬柟娉曞姞涓弬鏁帮紝鍙┖鐨勫弬鏁帮級锛岃В閿佺殑鏃跺�鎶婃潵婧愮疆绌恒�
+        /// </summary>
+        /// <param name="loc"></param>
+        /// <param name="lockState">1:鍏ュ簱閿併�2:鍑哄簱閿併�2:鍏跺畠閿�/param>
+        /// <param name="lockSource">閿佺殑鏉ユ簮=浠诲姟鍙�/param>
+        /// <returns></returns>
+        public static bool LockLoc(string loc, int lockState, string lockSource = "")
+        {
+            var res = false;
+            var db = DbHelper.GetDbClient();
+            var model = db.Queryable<TN_Location>().Where(a => a.S_CODE == loc).First();
+            LogHelper.Info($"閿佽揣浣峽loc},鐘舵�{lockState},淇℃伅" + JsonConvert.SerializeObject(model));
+            if (model != null && model.N_LOCK_STATE == 0)
+            {
+                model.N_LOCK_STATE = lockState;
+                model.S_LOCK_STATE = TN_Location.GetLockStateStr(lockState);
+                model.S_LOCK_OP = lockSource;
+                model.T_MODIFY = System.DateTime.Now;
+                res = db.Updateable<TN_Location>(model).UpdateColumns(it => new { it.N_LOCK_STATE, it.S_LOCK_STATE, it.S_LOCK_OP, it.T_MODIFY }).ExecuteCommand() > 0;
+            }
+            LogHelper.Info($"閿佽揣浣峽loc}杩斿洖{res}");
+
+            return res;
+        }
+
+        /// <summary>
+        /// 鍙栬揣瀹岃В閿佽捣鐐癸紝鍗歌揣瀹岃В閿佺粓鐐癸紝鍙楠岄攣鐨勬潵婧愶紝涔熷彲浠ヤ笉鏍¢獙
+        /// </summary>
+        /// <param name="loc"></param>
+        /// <returns></returns>
+        public static bool UnLockLoc(string loc)
+        {
+            LogHelper.Info("UnLockLoc:" + loc);
+            var res = false;
+            var db = DbHelper.GetDbClient();
+            var model = db.Queryable<TN_Location>().Where(a => a.S_CODE == loc).First();
+            if (model != null)
+            {
+                model.S_LOCK_STATE = "鏃�;
+                model.N_LOCK_STATE = 0;
+                model.S_LOCK_OP = "";
+                model.T_MODIFY = System.DateTime.Now;
+                res = db.Updateable(model).UpdateColumns(it => new { it.N_LOCK_STATE, it.S_LOCK_STATE, it.S_LOCK_OP, it.T_MODIFY }).ExecuteCommand() > 0;
+                LogHelper.Info("UnLockLoc:瑙i攣缁撴灉" + res);
+            }
+            else
+            {
+                LogHelper.Info("UnLockLoc 澶辫触" + loc);
+            }
+            return res;
+        }
+
+        /// <summary>
+        /// 璐т綅瑙g粦瀹瑰櫒
+        /// </summary>
+        /// <param name="loc"></param>
+        /// <param name="cntrs"></param>
+        /// <returns></returns>
+        public static string UnBindingLoc(string loc, List<string> cntrs)
+        {
+            var db = DbHelper.GetDbClient();
+            var logs = $"璐т綅锛歿loc}锛屽鍣細{JsonConvert.SerializeObject(cntrs)}";
+            try
+            {
+                var lcrList = db.Queryable<TN_Loc_Container>().Where(a => cntrs.Contains(a.S_CNTR_CODE) && a.S_LOC_CODE == loc).ToList();
+                if (lcrList.Count == 0)
+                {
+                    LogHelper.Info($"璐т綅鏃犻渶瑙g粦瀹瑰櫒锛屽湪鏁版嵁搴撲腑鏈壘鍒皗JsonConvert.SerializeObject(cntrs)}鐩稿叧鐨勮揣浣嶅鍣ㄥ叧绯昏〃淇℃伅");
+                }
+                cntrs = lcrList.Select(a => a.S_CNTR_CODE).ToList();
+
+
+                var log = JsonConvert.SerializeObject(cntrs);
+                var location = db.Queryable<TN_Location>().First(a => a.S_CODE == loc);
+                if (location != null)
+                {
+                    location.N_CURRENT_NUM = 0;
+                    location.S_LOCK_STATE = "鏃�;
+                    location.N_LOCK_STATE = 0;
+
+                    using (var tran = db.Ado.UseTran())
+                    {
+                        if (db.Deleteable<TN_Loc_Container>().Where(it => cntrs.Contains(it.S_CNTR_CODE) && it.S_LOC_CODE == loc).ExecuteCommand() > 0)
+                        {
+                            LogHelper.Info($"鍒犻櫎璐т綅瀹瑰櫒鍏崇郴琛ㄦ垚鍔燂紝{log}");
+                        }
+                        else
+                        {
+                            tran.RollbackTran();
+
+                            LogHelper.Info($"鍒犻櫎璐т綅瀹瑰櫒鍏崇郴琛ㄥけ璐ワ紝{log}");
+
+                            return "璐т綅瑙g粦瀹瑰櫒澶辫触锛� + logs;
+                        }
+
+                        log = JsonConvert.SerializeObject(location);
+                        if (db.Updateable(location).UpdateColumns(it => new { it.N_CURRENT_NUM, it.S_LOCK_STATE, it.N_LOCK_STATE }).ExecuteCommand() > 0)
+                        {
+                            tran.CommitTran();
+
+                            LogHelper.Info($"鏇存柊璐т綅琛ㄦ垚鍔燂紝{log}");
+                        }
+                        else
+                        {
+                            tran.RollbackTran();
+
+                            LogHelper.Info($"鏇存柊璐т綅琛ㄥけ璐ワ紝{log}");
+
+                            return "璐т綅瑙g粦瀹瑰櫒澶辫触锛� + logs;
+                        }
+                    }
+                }
+                else
+                {
+                    LogHelper.Info($"鍦ㄦ暟鎹簱涓湭鎵惧埌璇ヨ揣浣嶏紝鏃犻渶鏇存柊锛岃揣浣嶏細{loc}");
+                }
+                return "璐т綅瑙g粦瀹瑰櫒鎴愬姛锛� + logs;
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"鍙戠敓浜嗗紓甯革紝璐т綅瑙g粦瀹瑰櫒澶辫触锛寋ex.Message}");
+                return "璐т綅缁戝畾瀹瑰櫒澶辫触锛� + logs;
+            }
+        }
+
+        /// <summary>
+        /// 璐т綅缁戝畾瀹瑰櫒
+        /// </summary>
+        /// <param name="loc"></param>
+        /// <param name="cntrs"></param>
+        /// <returns></returns>
+        public static string BindingLoc(string loc, List<string> cntrs)
+        {
+            var db = DbHelper.GetDbClient();
+            var logs = $"璐т綅锛歿loc}锛屽鍣細{JsonConvert.SerializeObject(cntrs)}";
+            try
+            {
+                var lcrList = db.Queryable<TN_Loc_Container>().Where(a => cntrs.Contains(a.S_CNTR_CODE) && a.S_LOC_CODE == loc).ToList();
+
+                if (lcrList.Count > 0)
+                {
+                    cntrs = cntrs.Except(lcrList.Select(a => a.S_CNTR_CODE).ToList()).ToList();
+                }
+
+                var bindLocCntList = new List<TN_Loc_Container>();
+                foreach (var item in cntrs)
+                {
+                    bindLocCntList.Add(new TN_Loc_Container() { S_LOC_CODE = loc, S_CNTR_CODE = item });
+                }
+
+
+                var log = JsonConvert.SerializeObject(bindLocCntList);
+
+                using (var tran = db.Ado.UseTran())
+                {
+                    if (db.Insertable<TN_Loc_Container>(bindLocCntList).ExecuteCommand() > 0)
+                    {
+                        LogHelper.Info($"鎻掑叆璐т綅瀹瑰櫒鍏崇郴琛ㄦ垚鍔燂紝{log}");
+                    }
+                    else
+                    {
+                        db.RollbackTran();
+                        LogHelper.Info($"鎻掑叆璐т綅瀹瑰櫒鍏崇郴琛ㄥけ璐ワ紝{log}");
+                        return "璐т綅缁戝畾瀹瑰櫒澶辫触锛� + logs;
+                    }
+
+                    var location = db.Queryable<TN_Location>().First(a => a.S_CODE == loc);
+                    if (location != null)
+                    {
+                        location.N_CURRENT_NUM += cntrs.Count;
+                        location.S_LOCK_STATE = "鏃�;
+                        location.N_LOCK_STATE = 0;
+                        log = JsonConvert.SerializeObject(location);
+
+                        if (db.Updateable(location).UpdateColumns(it => new { it.N_CURRENT_NUM, it.S_LOCK_STATE, it.N_LOCK_STATE }).ExecuteCommand() > 0)
+                        {
+                            db.CommitTran();
+
+                            LogHelper.Info($"鏇存柊璐т綅琛ㄦ垚鍔燂紝{log}");
+                        }
+                        else
+                        {
+                            db.RollbackTran();
+
+                            LogHelper.Info($"鏇存柊璐т綅琛ㄥけ璐ワ紝{log}");
+
+                            return "璐т綅缁戝畾瀹瑰櫒澶辫触锛� + logs;
+                        }
+                    }
+                    else
+                    {
+                        db.RollbackTran();
+                        LogHelper.Info($"鏈壘鍒拌璐т綅{loc}锛屾垨鑰呭凡閿佸畾锛寋log}");
+                    }
+                }
+                return "璐т綅缁戝畾瀹瑰櫒鎴愬姛锛� + logs;
+            }
+            catch (Exception ex)
+            {
+                LogHelper.Info($"鍙戠敓浜嗗紓甯革紝璐т綅缁戝畾瀹瑰櫒澶辫触锛�);
+                return "璐т綅缁戝畾瀹瑰櫒澶辫触锛� + ex.Message;
+            }
+        }
+
+
+        /// <summary>
+        /// 浜哄伐鎵嬪姩PDA瑙g粦锛氬垹闄よ揣浣�瀹瑰櫒/璐у搧涓夋柟淇℃伅锛�=瑙g粦璐т綅涓庡鍣紝2=瑙g粦瀹瑰櫒涓庤揣鍝�+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult PdaUnBind(PdaUnBindInfo model)
+        {
+            var simpleResult = new SimpleResult();
+            if (model.reqCode == 1)
+            {
+                var res = UnBindingLoc(model.locID, new List<string>() { model.cntID });
+                simpleResult.resultCode = res.Contains("澶辫触") ? -1 : 0;
+                simpleResult.resultMsg = res;
+                return simpleResult;
+            }
+            if (model.reqCode == 2)
+            {
+                var res = ContainerHelper.UnBindingCG(model.cntID, new List<string>() { model.CgId });
+                simpleResult.resultCode = res.Contains("澶辫触") ? -1 : 0;
+                simpleResult.resultMsg = res;
+                return simpleResult;
+            }
+            simpleResult.resultCode = 3;
+            simpleResult.resultMsg = "浜哄伐鎵嬪姩PDA瑙g粦锛氬垹闄よ揣浣�瀹瑰櫒/璐у搧涓夋柟淇℃伅锛�=瑙g粦璐т綅涓庡鍣紝2=瑙g粦瀹瑰櫒涓庤揣鍝�;
+            return simpleResult;
+        }
+
+        /// <summary>
+        /// 寮傚父璐т綅瀹瑰櫒閲嶇疆锛氶噸缃揣浣�瀹瑰櫒/璐у搧涓夋柟淇℃伅锛�=鏍规嵁璐т綅閲嶇疆锛�=鐩存帴鏍规嵁瀹瑰櫒閲嶇疆
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult ErrorLocCntReset(ErrorLocCntResetInfo model)
+        {
+            LogHelper.Info("瑙﹀彂API锛氳揣浣嶅鍣ㄩ噸缃� + JsonConvert.SerializeObject(model), "API");
+
+            var result = new SimpleResult();
+            var db = DbHelper.GetDbClient();
+
+            try
+            {
+                if (model.locID != string.Empty && model.reqCode == 1)
+                {
+                    var locCntrRels = db.Queryable<TN_Loc_Container>().Where(a => a.S_LOC_CODE == model.locID).ToList();
+
+                    if (locCntrRels.Count == 0)
+                    {
+                        result.resultCode = 2;
+                        result.resultMsg = $"鏈壘鍒拌揣浣嶅鍣ㄥ叧绯讳俊鎭瘂model.locID}";
+                        LogHelper.Info(result.resultMsg);
+                        return result;
+                    }
+
+                    foreach (var item in locCntrRels)
+                    {
+                        var cG_Detail = db.Queryable<TN_CG_Detail>().Where(a => a.S_CNTR_CODE == item.S_CNTR_CODE).ToList();
+                        if (cG_Detail.Count > 0)
+                        {
+                            if (db.Deleteable<TN_CG_Detail>(cG_Detail).ExecuteCommand() <= 0)
+                            {
+                                LogHelper.Info($"鍒犻櫎瀹瑰櫒{model.cntID}璐у搧鏄庣粏琛ㄤ俊鎭け璐�);
+                                continue;
+                            }
+                        }
+                    }
+                    if (db.Deleteable<TN_Loc_Container>(locCntrRels).ExecuteCommand() <= 0)
+                    {
+                        result.resultCode = 3;
+                        result.resultMsg = $"鍒犻櫎璐т綅{model.locID}瀹瑰櫒{model.cntID}鍏崇郴琛ㄤ俊鎭け璐�;
+                        LogHelper.Info(result.resultMsg);
+                        return result;
+                    }
+
+                    var loc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.locID);
+                    if (loc != null)
+                    {
+                        loc.N_CURRENT_NUM = 0;
+                        loc.N_LOCK_STATE = 0;
+                        loc.S_LOCK_STATE = "鏃�;
+                        loc.C_ENABLE = "Y";
+                        if (db.Updateable<TN_Location>(loc).UpdateColumns(it => new { it.N_CURRENT_NUM, it.N_LOCK_STATE, it.S_LOCK_STATE, it.C_ENABLE }).ExecuteCommand() <= 0)
+                        {
+                            result.resultCode = 4;
+                            result.resultMsg = $"鏇存柊璐т綅{loc.S_CODE}淇℃伅澶辫触";
+                            LogHelper.Info(result.resultMsg);
+                            return result;
+                        }
+                    }
+                    string ackLog = $"閲嶇疆鎴愬姛锛岃揣浣峽model.locID}锛屽鍣▄JsonConvert.SerializeObject(locCntrRels.Select(a => a.S_CNTR_CODE).ToList())}";
+                    LogHelper.Info(ackLog);
+                    result.resultCode = 0;
+                    result.resultMsg = ackLog;
+                    return result;
+                }
+
+                if (model.cntID != string.Empty && model.reqCode == 2)
+                {
+                    var locCntrRel = db.Queryable<TN_Loc_Container>().First(a => a.S_CNTR_CODE == model.cntID);
+                    var cG_Detail = db.Queryable<TN_CG_Detail>().Where(a => a.S_CNTR_CODE == locCntrRel.S_CNTR_CODE).ToList();
+                    if (cG_Detail.Count > 0)
+                    {
+                        if (db.Deleteable<TN_CG_Detail>(cG_Detail).ExecuteCommand() <= 0)
+                        {
+                            result.resultCode = 5;
+                            result.resultMsg = $"鍒犻櫎瀹瑰櫒{model.cntID}璐у搧鏄庣粏琛ㄤ俊鎭け璐�;
+                            LogHelper.Info(result.resultMsg);
+                            return result;
+                        }
+                    }
+                    var loc = db.Queryable<TN_Location>().First(a => a.S_CODE == locCntrRel.S_LOC_CODE);
+                    if (loc != null)
+                    {
+                        loc.N_CURRENT_NUM = 0;
+                        loc.N_LOCK_STATE = 0;
+                        loc.S_LOCK_STATE = "鏃�;
+                        loc.C_ENABLE = "Y";
+                        if (db.Updateable<TN_Location>(loc).UpdateColumns(it => new { it.N_CURRENT_NUM, it.N_LOCK_STATE, it.S_LOCK_STATE, it.C_ENABLE }).ExecuteCommand() <= 0)
+                        {
+                            result.resultCode = 6;
+                            result.resultMsg = $"鏇存柊璐т綅{loc.S_CODE}淇℃伅澶辫触";
+                            LogHelper.Info(result.resultMsg);
+                            return result;
+                        }
+                    }
+                }
+                result.resultCode = 0;
+                result.resultMsg = $"閲嶇疆鎴愬姛锛屽鍣▄model.cntID}";
+                LogHelper.Info(result.resultMsg);
+                return result;
+            }
+            catch (Exception ex)
+            {
+                result.resultCode = -1;
+                result.resultMsg = $"鍙戠敓浜嗗紓甯革細{ex.Message}";
+                LogHelper.Info(result.resultMsg);
+                return result;
+            }
+        }
+
+        public static string GetStrByOk(int state)
+        {
+            if (state == 0)
+            {
+                return "鍚堟牸"; 
+            }
+            if (state == 1)
+            {
+                return "寰呮";
+            }
+            if (state == 2)
+            {
+                return "涓嶅悎鏍�;
+            }
+            if (state == 3)
+            {
+                return "姝e湪妫�獙";
+            }
+            return "寰呮";
+        }
+    }
+
+    public class PdaUnBindInfo
+    {
+        public string cntID { get; set; }//瀹瑰櫒ID
+        public string locID { get; set; }//璐т綅ID
+        public string CgId { get; set; }//鐗╂枡缂栫爜
+        public int reqCode { get; set; }//璇锋眰浠g爜
+    }
+
+    public class EmptyUnBindInfo
+    {
+        public string cntID { get; set; }//瀹瑰櫒ID
+    }
+
+    public class CancleTaskInfo
+    {
+        public string taskNO { get; set; }//浠诲姟鍙�+    }
+
+    public class PDAFullInAreaInfo
+    {
+        public string StartLoc { get; set; }//璧风偣
+        public string RfId { get; set; }//瀹瑰櫒鍙�+        public string Spe { get; set; }//瑙勬牸
+        public string CarCode { get; set; }//杞﹀彿
+    }
+
+    public class ErrorLocCntResetInfo
+    {
+        public string cntID { get; set; }//瀹瑰櫒ID
+        public string locID { get; set; }//璐т綅ID
+        public int reqCode { get; set; }//璇锋眰浠g爜
+    }
+
+    public class PDAFullCheckInfo
+    {
+        public string RfId { get; set; }//瀹瑰櫒鍙�+    }
+
+    public class ShowCntCountBySpeInfo
+    {
+        public string Spe { get; set; }//瑙勬牸
+
+    }
+}
diff --git a/Helpers/LogHelper.cs b/Helpers/LogHelper.cs
new file mode 100644
index 0000000..c8aeeb1
--- /dev/null
+++ b/Helpers/LogHelper.cs
@@ -0,0 +1,142 @@
+锘縰sing NLog;
+using NLog.Common;
+using NLog.Config;
+using NLog.Targets;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang
+{
+    public class LogHelper
+    {
+        public static Dictionary<string, ILogger> loggers = new Dictionary<string, ILogger>();
+
+        public static void Debug(string message, string name = "") {
+            ILogger logger = null;
+            if (loggers.Keys.Contains(name)) {
+                logger = loggers[name];
+            }
+            else {
+                logger = LogFactory.CreateLogger(name);
+                if (logger != null) {
+                    loggers.Add(name, logger);
+                }
+                else {
+                    logger = LogFactory.CreateLogger("console");
+                }
+            }
+            if (logger != null) {
+                logger.Debug(message);
+            }
+        }
+
+
+
+        public static void Info(string message, string name = "") {
+            //logger.Info(message);
+            ILogger logger = null;
+            if (loggers.Keys.Contains(name)) {
+                logger = loggers[name];
+            }
+            else {
+                logger = LogFactory.CreateLogger(name);
+                if (logger != null) {
+                    loggers.Add(name, logger);
+                }
+                else {
+                    logger = LogFactory.CreateLogger("infoFile");
+                }
+            }
+            if (logger != null) {
+                logger.Info(message);
+            }
+        }
+
+        public static void Error(string message, Exception ex, string name = "") {
+            //logger.Error(ex, message);
+            ILogger logger = null;
+            if (loggers.Keys.Contains(name)) {
+                logger = loggers[name];
+            }
+            else {
+                logger = LogFactory.CreateLogger(name);
+                if (logger != null) {
+                    loggers.Add(name, logger);
+                }
+                else {
+                    logger = LogFactory.CreateLogger("errorFile");
+                }
+            }
+            if (logger != null) {
+                logger.Error($"{message}{ex.StackTrace}");
+            }
+        }
+    }
+
+    internal class LogFactory
+    {
+        /// <summary>
+        /// 閫氳繃閰嶇疆鏂囦欢閰嶇疆鏃ュ織
+        /// </summary>
+        static LogFactory() {
+            var loggerNames = new List<string>() { "HosttoagvTask", "HosttoagvCar", "NDC", "鏉ゥ", "PLC", "API", "OPC" };
+            LogManager.Configuration = DefaultConfig(loggerNames);
+        }
+        public static ILogger CreateLogger(string name) {
+            var logger = LogManager.GetLogger(name);
+            return logger;
+        }
+
+        public static LoggingConfiguration DefaultConfig(List<string> loggerNames) {
+            var config = new LoggingConfiguration();
+            loggerNames.ForEach(a => {
+                var target = new FileTarget();
+                target.ArchiveAboveSize = 1024 * 1024 * 5;//姣忎釜鏂囦欢鏈�ぇ5M
+                target.ArchiveNumbering = ArchiveNumberingMode.DateAndSequence;
+                target.ArchiveFileName = @"${basedir}/Logs/" + a + "/{####}.txt";
+                target.FileName = @"${basedir}/Logs/" + a + "/${shortdate}.txt";//褰撳墠鏂囦欢璺緞
+                target.Layout = @"${longdate} | ${level:uppercase=false:padding=-5} | ${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}";
+
+                config.AddTarget(a, target);
+                config.AddRuleForOneLevel(LogLevel.Info, target, a);
+            });
+
+            // 娣诲姞target-console
+            var consoleTarget = new ColoredConsoleTarget();
+            consoleTarget.Layout = @"${longdate} | ${level:uppercase=false:padding=-5} | ${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}";
+
+            config.AddTarget("console", consoleTarget);
+            config.AddRule(LogLevel.Debug, LogLevel.Fatal, consoleTarget);
+
+            //娣诲姞target-info
+            var infoFileTarget = new FileTarget();
+            infoFileTarget.ArchiveAboveSize = 1024 * 1024 * 5;//姣忎釜鏂囦欢鏈�ぇ5M
+            infoFileTarget.ArchiveNumbering = ArchiveNumberingMode.DateAndSequence;
+            infoFileTarget.ArchiveFileName = @"${basedir}/Logs/Info/{####}.txt";
+            infoFileTarget.FileName = @"${basedir}/Logs/Info/${shortdate}.txt";//褰撳墠鏂囦欢璺緞
+            infoFileTarget.Layout = @"${longdate} | ${level:uppercase=false:padding=-5} | ${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}";
+
+            config.AddTarget("infoFile", infoFileTarget);
+            config.AddRuleForOneLevel(LogLevel.Info, infoFileTarget);//INFO鍐欏湪Info鏂囦欢
+
+            //娣诲姞target-err
+            var errorFileTarget = new FileTarget();
+            errorFileTarget.ArchiveAboveSize = 1024 * 1024 * 5;//姣忎釜鏂囦欢鏈�ぇ5M
+            errorFileTarget.ArchiveNumbering = ArchiveNumberingMode.DateAndSequence;
+            errorFileTarget.ArchiveFileName = @"${basedir}/Logs/Error/{####}.txt";
+            errorFileTarget.FileName = @"${basedir}/Logs/Error/${shortdate}.txt";
+            errorFileTarget.Layout = @"${longdate} | ${level:uppercase=false:padding=-5} | ${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}";
+
+            config.AddTarget("errorFile", errorFileTarget);
+            config.AddRule(LogLevel.Error, LogLevel.Fatal, errorFileTarget);
+
+
+            return config;
+        }
+
+
+    }
+}
diff --git a/Helpers/ResultHelper.cs b/Helpers/ResultHelper.cs
new file mode 100644
index 0000000..59913b4
--- /dev/null
+++ b/Helpers/ResultHelper.cs
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using static HH.WCS.Mobox3.AnGang.Dtos.Response.MoboxResponse;
+
+namespace HH.WCS.Mobox3.AnGang.Helpers {
+    public class ResultHelper {
+        public static SimpleResult BuildSimpleResult(int code, string message, bool pringLog = true) {
+            if (pringLog) {
+                LogHelper.Info(message);
+            }
+            return new SimpleResult { Code = code, Message = message };
+        }
+    }
+}
diff --git a/Helpers/SYSHelper.cs b/Helpers/SYSHelper.cs
new file mode 100644
index 0000000..7953e73
--- /dev/null
+++ b/Helpers/SYSHelper.cs
@@ -0,0 +1,45 @@
+锘縰sing HH.WCS.Mobox3.AnGang.config;
+using HH.WCS.Mobox3.AnGang.Helpers;
+
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Helper
+{
+    internal class SYSHelper
+    {
+        private static object locker = new object();
+        internal static int GetSerialNumber(string snType, string prefix) {
+            int result = 0;
+            lock (locker) {
+                var db = DbHelper.GetDbClient();
+                var sId = db.Queryable<OI_SYS_MAXID>().Where(a => a.CN_S_TYPE.Trim() == snType && a.CN_S_PRE.Trim() == prefix).First();
+                if (sId != null) {
+                    sId.CN_N_MAX++;
+                    if (db.Ado.ExecuteCommand($"update OI_SYS_MAXID set CN_N_MAX={sId.CN_N_MAX} where CN_S_TYPE='{snType}' and CN_S_PRE='{prefix}' ") > 0) {
+                        result = sId.CN_N_MAX;
+                    }
+                }
+                else {
+                    //鎻掑叆琛�+                    sId = new OI_SYS_MAXID { CN_S_TYPE = snType, CN_S_PRE = prefix, CN_N_MAX = 1 };
+                    result = db.Insertable<OI_SYS_MAXID>(sId).ExecuteCommand() > 0 ? 1 : 0;
+
+                }
+            }
+            return result;
+        }
+
+        [SugarTable("dbo.OI_SYS_MAXID")]
+        public class OI_SYS_MAXID
+        {
+            public string CN_S_TYPE { get; set; }
+            public string CN_S_PRE { get; set; }
+            public int CN_N_MAX { get; set; }
+        }
+    }
+}
diff --git a/Helpers/TaskHelper.cs b/Helpers/TaskHelper.cs
new file mode 100644
index 0000000..f2ba439
--- /dev/null
+++ b/Helpers/TaskHelper.cs
@@ -0,0 +1,218 @@
+锘縰sing HH.WCS.Mobox3.AnGang.ServiceCore;
+using HH.WCS.Mobox3.AnGang.Dispatch;
+using HH.WCS.Mobox3.AnGang.config;
+using HH.WCS.Mobox3.AnGang.Helper;
+using Newtonsoft.Json;
+using Opc.Ua;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Cryptography;
+using static HH.WCS.Mobox3.AnGang.Controllers.ApiModel;
+using Org.BouncyCastle.Crypto;
+using HH.WCS.Mobox3.AnGang.Devices;
+using HH.WCS.Mobox3.AnGang.Models;
+
+namespace HH.WCS.Mobox3.AnGang.process {
+    internal class TaskHelper {
+        #region 浠诲姟鐩稿叧
+        //--------------------------------------------------浠诲姟鐩稿叧--------------------------------------------------
+        /// <summary>
+        /// 鍙栬揣鍗歌揣瀹屾垚锛岀紦瀛樹綅鐘舵�鏇存柊
+        /// </summary>
+        /// <param name="mst"></param>
+        /// <param name="load"></param>
+        internal static void CacheBitUpdate(TN_Task mst, bool load) {
+            var trayCarryCount = mst.N_CNTR_COUNT > 0 ? mst.N_CNTR_COUNT : 1;
+            if (load) {
+                Console.WriteLine($"浠诲姟{mst.S_CODE} 璐т綅{mst.S_START_LOC}鍙栬揣瀹屾垚锛岃捣鐐硅В缁戝鍣▄mst.S_CNTR_CODE}");
+                LogHelper.Info($"浠诲姟{mst.S_CODE} 璐т綅{mst.S_START_LOC}鍙栬揣瀹屾垚锛岃捣鐐硅В缁戝鍣▄mst.S_CNTR_CODE}");
+                LocationHelper.UnBindingLoc(mst.S_START_LOC, mst.S_CNTR_CODE.Split(',').ToList());
+            }
+            else {
+                Console.WriteLine($"浠诲姟{mst.S_CODE} 璐т綅{mst.S_END_LOC}鍗歌揣瀹屾垚锛岀粓鐐圭粦瀹氬鍣▄mst.S_CNTR_CODE}");
+                LogHelper.Info($"浠诲姟{mst.S_CODE} 璐т綅{mst.S_END_LOC}鍗歌揣瀹屾垚锛岀粓鐐圭粦瀹氬鍣▄mst.S_CNTR_CODE}");
+                LocationHelper.BindingLoc(mst.S_END_LOC, mst.S_CNTR_CODE.Split(',').ToList());
+            }
+        }
+
+        /// <summary>
+        /// 浠诲姟鍙栨秷锛岀紦瀛樹綅鐘舵�鏇存柊
+        /// </summary>
+        /// <param name="mst"></param>
+        internal static void CacheBitCancelUpdate(TN_Task mst) {
+            //浠诲姟鍙栨秷锛屽彇璐у畬鎴愬墠鐨勶紝璧风偣鐨刲oadingCount鍜岀粓鐐箄nLoadingCount閮芥竻闄わ紝鍙栬揣瀹屾垚鐨勫彧澶勭悊缁堢偣
+            if (WCSHelper.CheckActionRecordExist(mst.S_CODE, 4)) {
+                //鏍规嵁瀹㈡埛鐜板満瑕佹眰锛屽鏋滃彇璐у畬鎴愪换鍔″け璐ヤ汉宸ユ媺鍒扮粓鐐癸紝鎴戜滑灏卞綋鍗歌揣瀹屾垚澶勭悊锛涘鏋滄槸浜哄伐鎷夎蛋鍒板叾瀹冨尯鍩燂紝鎴戜滑灏辫В閿佺粓鐐癸紝鍒犻櫎鎵樼洏銆�+                //缁堢偣缁戝畾
+                CacheBitUpdate(mst, false);
+                LocationHelper.UnLockLoc(mst.S_END_LOC);
+            }
+            else {
+
+                //璧风偣缁堢偣瑙i攣
+                LocationHelper.UnLockLoc(mst.S_START_LOC);
+                LocationHelper.UnLockLoc(mst.S_END_LOC);
+
+            }
+
+        }
+
+        
+
+        /// <summary>
+        /// 浠诲姟鐘舵�鏇存柊澶勭悊
+        /// </summary>
+        /// <param name="mst"></param>
+        /// <param name="state"></param>
+        internal static void OperateStatus(TN_Task mst, int state) {
+            if (state == 4) 
+            {
+                CacheBitUpdate(mst, true);
+            }
+            if (state == 6)//鍗歌揣瀹屾垚
+            {
+                CacheBitUpdate(mst, false);
+            }
+            if (state == 7) {
+                CacheBitCancelUpdate(mst);
+            }
+        }
+
+        /// <summary>
+        /// 瀹夊叏璇锋眰
+        /// </summary>
+        /// <param name="no"></param>
+        /// <param name="state"></param>
+        /// <param name="forkliftNo"></param>
+        /// <param name="extData"></param>
+        internal static void OperateReq(string no, int state, string forkliftNo, string extData = "")
+        {
+            if (state == 1101)
+            {
+                //璇锋眰鍙栬揣锛�+
+            }
+            if (state == 1102)
+            {
+                //璇锋眰鍗歌揣锛�+                //鏍规嵁缁堢偣鍒ゆ柇锛屾槸cb02鐨勫叆鍙o紝鍒ゆ柇鍐呭瓨涓姸鎬侊紙瑕佺姸鎬佹椂闂达級锛屽厑璁稿嵏璐э紝閫氱煡agv鏀瑰弬鏁�+                var dic = new Dictionary<string, string>();
+                //< Req >< Order No = 'TN2302020002' ParamNo = '18' Param1 = '12' /></ Req >
+                dic.Add("No", no);
+                dic.Add("ParamNo", "8");
+                dic.Add("Param1", "1");
+                NDC.ChangeOrder(dic);
+                //鏀瑰畬鍙傛暟杞﹀瓙灏变細鑷繁鍗歌揣
+            }
+            if (state == 1103)
+            {
+                //澶ч搧妗嗗弶璧颁互鍚庨�鐭ワ紝鎴戜滑瑕侀�鐭ヨ緭閫佺嚎
+            }
+        }
+
+        private static object locLocker = new object();
+
+
+       /// <summary>
+        /// 鎺ㄩ�浠诲姟
+        /// </summary>
+        /// <param name="mst"></param>
+        internal static bool SendTask(TN_Task mst) 
+        {
+
+            var result = false;
+            var start = "0"; var end = "0";
+            var taskType = mst.S_TYPE.Trim();
+            if (mst.N_B_STATE == 0) {
+                if (mst.N_SCHEDULE_TYPE == 1)//閫氳繃NDC锛宧osttoagv璋冨害璁惧
+                {
+                    start = LocationHelper.GetAgvSite(mst.S_START_LOC);
+                    end = LocationHelper.GetAgvSite(mst.S_END_LOC);
+
+                    if (mst.S_TYPE == "绌烘墭涓嬬嚎鍫嗗彔")
+                    {
+                        end = LocationHelper.GetAgvSite(mst.S_END_LOC,true);
+                    }
+
+                    LogHelper.Info($"NDC鎺ㄩ�浠诲姟 {mst.S_CODE};" + "start=" + start + "end= " + end);
+                    var startLoc = LocationHelper.GetLoc(mst.S_START_LOC);
+                    var endLoc = LocationHelper.GetLoc(mst.S_END_LOC);
+                    var dic = new List<param>();
+                    dic.Add(new param() { name = "IKey", value = "IKey" });
+                    dic.Add(new param() { name = "From", value = start.ToString() });
+                    dic.Add(new param() { name = "To", value = end.ToString() });
+                    dic.Add(new param() { name = "FUNC", value = startLoc.N_LAYER.ToString() });
+
+                    dic.Add(new param() { name = "Ctype", value = "0" });
+
+                    
+                    if (mst.S_TYPE == "浣欐枡涓嬬嚎鍏ュ簱" || mst.S_TYPE == "浜哄伐鎷嗙洏鍏ュ簱")
+                    {
+                        dic.Add(new param() { name = "DATA", value = "1024" });
+                    }
+                    else
+                    {
+                        dic.Add(new param() { name = "DATA", value = "0" });
+                    }
+
+                    var res = NDCApi.AddOrderNew(1, 1, mst.S_CODE, dic);//娣诲姞鏂板懡浠�+                    if (res != null && (res.err_code == 0 || res.err_code == 50009))
+                    {
+                        //鎺ㄩ�鎴愬姛锛屼慨鏀逛换鍔′紭鍏堢骇
+                        mst.N_B_STATE = 1;
+                        mst.S_B_STATE = TN_Task.GetStateStr(1);
+                        WCSHelper.UpdateStatus(mst);//鏇存柊浠诲姟鐘舵�
+                        result = true;
+                        LogHelper.Info($"NDC鎺ㄩ�浠诲姟鎴愬姛 {mst.S_CODE}start= {mst.S_START_LOC} + end = {mst.S_END_LOC}");
+                    }
+                    else
+                    {
+                        LogHelper.Info($"NDC鎺ㄩ�浠诲姟澶辫触 {mst.S_CODE};Res:" + JsonConvert.SerializeObject(res));
+                    }
+                }
+                else if (mst.N_SCHEDULE_TYPE == 5)//閫氳繃鏉ゥ璋冨害璁惧 
+                {
+                    //璋冪涓夋柟鎺ュ彛
+                    var model = new HanAo.TaskInfoModel
+                    {
+                        requestPk = mst.S_CODE,
+                        frmPos = mst.S_START_LOC,
+                        toPos = mst.S_END_LOC,
+                        trkType = mst.S_OP_NAME == "鍏ュ簱" ? "1" : "2",
+                        contNo = mst.S_CNTR_CODE
+                    };
+                    if (HanAo.CreateOrder(model)) {
+                        mst.N_B_STATE = 1;
+                        WCSHelper.UpdateStatus(mst);
+                        LogHelper.Info($"鏉ゥ鎺ㄩ�浠诲姟鎴愬姛 {mst.S_CODE};" + "start=" + model.frmPos + "end= " + model.toPos);
+                    }
+                    else
+                    {
+                        LogHelper.Info($"鏉ゥ鎺ㄩ�浠诲姟澶辫触 {mst.S_CODE};" + JsonConvert.SerializeObject(model));
+                    }
+                }
+                else if (mst.N_SCHEDULE_TYPE == 3) //閫氳繃鍥借嚜璋冨害璁惧
+                {
+                    var code = GZRobot.CreateOrder(mst.S_CODE, mst.N_PRIORITY, JsonConvert.SerializeObject(new { src = mst.S_START_LOC, dst = mst.S_END_LOC }), "p2p");
+                    if (code > 0) {
+                        //鏇存柊浠诲姟鐘舵�
+                        mst.N_B_STATE = 1;
+                        mst.S_EQ_TASK_CODE = code.ToString();
+                        WCSHelper.UpdateStatus(mst);
+                        WCSHelper.UpdateEQNo(mst);
+                        LogHelper.Info($"鍥借嚜鎺ㄩ�浠诲姟鎴愬姛 {mst.S_CODE};" + "start=" + mst.S_START_LOC + "end= " + mst.S_END_LOC);
+                    }
+                    else
+                    {
+                        LogHelper.Info($"鍥借嚜鎺ㄩ�浠诲姟澶辫触 {mst.S_CODE};" + JsonConvert.SerializeObject(mst));
+                    }
+                }
+
+            }
+            return result;
+        }
+        #endregion
+    }
+}
diff --git a/Helpers/WCSHelper.cs b/Helpers/WCSHelper.cs
new file mode 100644
index 0000000..d764a5f
--- /dev/null
+++ b/Helpers/WCSHelper.cs
@@ -0,0 +1,240 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.config;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HH.WCS.Mobox3.AnGang.Helpers;
+
+namespace HH.WCS.Mobox3.AnGang.Helper {
+    internal class WCSHelper {
+        internal static string GenerateTaskNo() {
+            var id = SYSHelper.GetSerialNumber("浠诲姟鍙�, "TN");
+            var date = DateTime.Now.ToString("yyMMdd");
+            return $"TN{date}{id.ToString().PadLeft(4, '0')}";
+        }
+        internal static bool UpdateStatus(TN_Task task, string status) 
+        {
+            var res = false;
+            var db = DbHelper.GetDbClient();
+            task.S_B_STATE = status;
+            res = db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE }).ExecuteCommand()>0;
+            return res;
+        }
+        internal static bool UpdateStatus(TN_Task task) {
+            var res = false;
+            var db = DbHelper.GetDbClient();
+            task.S_B_STATE = TN_Task.GetStateStr(task.N_B_STATE);
+            task.T_MODIFY = DateTime.Now;
+            db.Updateable(task).UpdateColumns(it => new { it.N_B_STATE, it.S_B_STATE, it.T_MODIFY }).ExecuteCommand();
+            return res;
+        }
+
+        internal static bool UpdateEQNo(TN_Task task) {
+            var res = false;
+            var db = DbHelper.GetDbClient();
+            task.T_MODIFY = DateTime.Now;
+            db.Updateable(task).UpdateColumns(it => new { it.S_EQ_TASK_CODE, it.T_MODIFY }).ExecuteCommand();
+            return res;
+        }
+
+        internal static TN_Task GetTask(string no) {
+            var db = DbHelper.GetDbClient();
+            var task = db.Queryable<TN_Task>().Where(a => a.S_CODE == no).First();
+            return task;
+        }
+
+        /// <summary>
+        /// 鍒涘缓鎼�浠诲姟
+        /// </summary>
+        /// <param name="no">缂栧彿</param>
+        /// <param name="from">璧风偣</param>
+        /// <param name="to">缁堢偣</param>
+        /// <param name="taskType">浠诲姟绫诲瀷</param>
+        /// <param name="pri">浼樺厛绾�/param>
+        /// <param name="cntrInfo">瀹瑰櫒缂栫爜</param>
+        /// <returns></returns>
+        internal static bool CreateTask(string from, string to, string taskType, int pri, string cntrInfo) 
+        {
+            var fromLoc = LocationHelper.GetLocation(from);
+            var endLoc = LocationHelper.GetLocation(to);
+            TN_Task TN_Task = new TN_Task()
+            {
+                S_CODE = GenerateTaskNo(),
+                S_START_AREA = fromLoc.S_AREA_CODE,
+                S_END_AREA = endLoc?.S_AREA_CODE ?? "", // 濡傛灉涓簄ull杩斿洖绌哄瓧绗︿覆
+                S_START_LOC = from,
+                S_END_LOC = to,
+                S_TYPE = taskType,
+                N_PRIORITY = pri,
+                N_SCHEDULE_TYPE = 3, // 鍥借嚜
+                N_B_STATE = 0,
+                S_CNTR_CODE = cntrInfo,
+            };
+
+            var log = JsonConvert.SerializeObject(TN_Task);
+            var db = DbHelper.GetDbClient();
+            var res = db.Insertable(TN_Task).ExecuteCommand() > 0;
+            if (res)
+            {
+                LogHelper.Info($"鎻掑叆浠诲姟鎴愬姛锛寋log}");
+            }
+            else
+            {
+                LogHelper.Info($"鎻掑叆浠诲姟澶辫触锛寋log}");
+            }
+            return res;
+        }
+
+        /// <summary>
+        /// 鏍规嵁缁堢偣Area鍒涘缓鎼�浠诲姟
+        /// </summary>
+        /// <param name="from"></param>
+        /// <param name="toArea"></param>
+        /// <param name="taskType"></param>
+        /// <param name="pri"></param>
+        /// <param name="cntrInfo"></param>
+        /// <returns></returns>
+        internal static bool CreateTaskWithArea(string from, string toArea, string taskType, int pri, string cntrInfo) {
+            var fromLoc = LocationHelper.GetLocation(from);
+            //var endLoc = LocationHelper.GetLocation(to);
+            TN_Task TN_Task = new TN_Task() {
+                S_CODE = GenerateTaskNo(),
+                S_START_AREA = fromLoc.S_AREA_CODE,
+                S_END_AREA = toArea,
+                S_START_LOC = from,
+                S_END_LOC = "", // 涓嶆寚瀹氱粓鐐硅揣浣�+                S_TYPE = taskType,
+                N_PRIORITY = pri,
+                N_SCHEDULE_TYPE = 3, // 鍥借嚜
+                N_B_STATE = 0,
+                S_CNTR_CODE = cntrInfo,
+            };
+
+            var log = JsonConvert.SerializeObject(TN_Task);
+            var db = DbHelper.GetDbClient();
+            var res = db.Insertable(TN_Task).ExecuteCommand() > 0;
+            if (res) {
+                LogHelper.Info($"鎻掑叆浠诲姟鎴愬姛锛寋log}");
+            }
+            else {
+                LogHelper.Info($"鎻掑叆浠诲姟澶辫触锛寋log}");
+            }
+            return res;
+        }
+
+        public static bool CreateTask(List<CreateTasks> modes)
+        {
+            if (modes != null && modes.Count > 0)
+            {
+                List<TN_Task> tN_Tasks = new List<TN_Task>();
+
+                foreach (var item in modes)
+                {
+
+                    var fromLoc = LocationHelper.GetLocation(item.from);
+                    var endLoc = LocationHelper.GetLocation(item.to);
+
+                    tN_Tasks.Add(new TN_Task()
+                    {
+                        S_CODE = GenerateTaskNo(),
+                        S_START_AREA = fromLoc.S_AREA_CODE,
+                        S_END_AREA = endLoc.S_AREA_CODE,
+                        S_START_LOC = item.from,
+                        S_END_LOC = item.to,
+                        S_TYPE = item.taskType,
+                        N_PRIORITY = item.pri,
+                        N_SCHEDULE_TYPE = 3, // 鍥借嚜
+                        N_B_STATE = 0,
+                        S_CNTR_CODE = item.cntrInfo,
+                    });
+                }
+                var log = JsonConvert.SerializeObject(tN_Tasks);
+                var db = DbHelper.GetDbClient();
+                var res = db.Insertable<TN_Task>(tN_Tasks).ExecuteCommand() > 0;
+                if (res)
+                {
+                    LogHelper.Info($"鎻掑叆浠诲姟鎴愬姛锛寋log}");
+                }
+                else
+                {
+                    LogHelper.Info($"鎻掑叆浠诲姟澶辫触锛寋log}");
+                }
+                return res;
+            }
+
+            return false;
+        }
+
+
+        internal static bool CheckActionRecordExist(string no, int code) {
+            var db = DbHelper.GetDbClient();
+            return db.Queryable<TN_Task_Action>().Count(a => a.S_TASK_CODE == no && a.N_ACTION_CODE == code) > 0;
+        }
+
+        internal static void Begin(TN_Task task, string forklift_no) 
+        {
+            var db = DbHelper.GetDbClient();
+            if (task != null) 
+            {
+                if (task.N_B_STATE == 1) 
+                {
+                    task.N_B_STATE = 2;
+                    task.S_B_STATE = TN_Task.GetStateStr(task.N_B_STATE);
+                    task.T_START_TIME = System.DateTime.Now;
+                    task.S_EQ_NO = forklift_no;
+                    db.Updateable(task).UpdateColumns(it => new { it.N_B_STATE, it.S_B_STATE, it.T_START_TIME, it.S_EQ_NO }).ExecuteCommand();
+                }
+
+            }
+        }
+        internal static void End(TN_Task task) {
+            var db = DbHelper.GetDbClient();
+            if (task != null) {
+                task.N_B_STATE = 3;
+                task.S_B_STATE = TN_Task.GetStateStr(task.N_B_STATE);
+                task.T_END_TIME = DateTime.Now;
+                db.Updateable(task).UpdateColumns(it => new { it.N_B_STATE, it.S_B_STATE, it.T_END_TIME }).ExecuteCommand();
+            }
+        }
+        internal static void Fail(TN_Task task) {
+            var db = DbHelper.GetDbClient();
+            if (task != null) {
+                //鍒ゆ柇鏈夋病鏈夊彇璐у畬鎴愶紝娌℃湁灏卞彉鎴愬け璐ャ�鏈夊彇璐у畬鎴愰粯璁ゅ畬鎴愪簡锛堣窡鎹」鐩�瀹氾紝鏈変簺椤圭洰浜哄伐鎷夎蛋浜嗕篃娌℃湁鏀惧埌缁堢偣锛夈�
+                task.N_B_STATE = 4;
+                task.S_B_STATE = TN_Task.GetStateStr(task.N_B_STATE);
+                db.Updateable(task).UpdateColumns(it => new { it.N_B_STATE, it.S_B_STATE }).ExecuteCommand();
+            }
+        }
+
+        internal static bool AddActionRecord(string no, int state, string forkliftNo, string extData)
+        {
+            var db = DbHelper.GetDbClient();
+            var action = new TN_Task_Action()
+            {
+                N_ACTION_CODE = state,
+                S_TASK_CODE = no,
+                S_EQ_CODE = forkliftNo,
+                S_EQ_TYPE = "agv",
+                S_DATA = extData
+            };
+            return db.Insertable(action).ExecuteCommand() > 0;
+        }
+
+        internal static List<TN_Task> GetWaitingTaskList() {
+            var db = DbHelper.GetDbClient();
+            return db.Queryable<TN_Task>().Where(a => a.N_B_STATE == 0 && (a.S_B_STATE == "绛夊緟" || a.S_B_STATE == "寰呮帹閫�)).ToList();
+        }
+    }
+
+    public class CreateTasks
+    {
+        public string from { set; get; }
+        public string to { set; get; }
+        public string taskType { set; get; }
+        public int pri { set; get; }
+        public string cntrInfo { set; get; }
+    }
+}
diff --git a/Helpers/WMSHelper.cs b/Helpers/WMSHelper.cs
new file mode 100644
index 0000000..9e32606
--- /dev/null
+++ b/Helpers/WMSHelper.cs
@@ -0,0 +1,93 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Controllers;
+using HH.WCS.Mobox3.AnGang.Dispatch;
+using HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.config;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Reflection;
+using System.Runtime.Remoting.Messaging;
+using System.Text;
+using System.Threading.Tasks;
+using static HH.WCS.Mobox3.AnGang.Controllers.ApiModel;
+using HH.WCS.Mobox3.AnGang.Helpers;
+
+namespace HH.WCS.Mobox3.AnGang.Helper
+{
+    /// <summary>
+    /// wms绠″埌浣滀笟
+    /// </summary>
+    internal class WMSHelper
+    {
+        /// <summary>
+        /// 浜哄伐鎵嬪姩PDA鍙栨秷浠诲姟锛�=鍙戠粰AGV鍙栨秷浠诲姟
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult PDACancleTask(CancleTaskInfo model)
+        {
+            SimpleResult simpleResult = new SimpleResult();
+            var db = DbHelper.GetDbClient();
+            try
+            {
+                if (model.taskNO.Length > 0)
+                {
+                    var task = db.Queryable<TN_Task>().First(a => a.S_CODE == model.taskNO);
+                    if (task != null && task.S_B_STATE != "瀹屾垚")
+                    {
+                        if (NDCApi.CancelOrder(model.taskNO).err_code == 0)
+                        {
+                            task.S_B_STATE = "閿欒";
+                            task.N_B_STATE = 4;
+                            if (db.Updateable<TN_Task>(task).ExecuteCommand() > 0)
+                            {
+                                simpleResult.resultCode = 0;
+                                simpleResult.resultMsg = $"閫氱煡AGV鍙栨秷璇ヤ换鍔″彿锛屾垚鍔燂紝{model.taskNO}";
+                                LogHelper.Info(simpleResult.resultMsg);
+                                return simpleResult;
+                            }
+                            else
+                            {
+                                simpleResult.resultCode = 4;
+                                simpleResult.resultMsg = $"鏇存柊浠诲姟鐘舵�淇℃伅澶辫触{model.taskNO}";
+                                LogHelper.Info(simpleResult.resultMsg);
+                                return simpleResult;
+                            }
+                        }
+                        else
+                        {
+                            simpleResult.resultCode = 1;
+                            simpleResult.resultMsg = $"閫氱煡AGV鍙栨秷璇ヤ换鍔″彿锛屽け璐ワ紝{model.taskNO}";
+                            LogHelper.Info(simpleResult.resultMsg);
+                            return simpleResult;
+                        }
+
+                    }
+                    else
+                    {
+                        simpleResult.resultCode = 2;
+                        simpleResult.resultMsg = $"鏈壘鍒拌浠诲姟鍙锋垨璇ヤ换鍔″彿宸插畬鎴愶紝鏃犻渶閫氱煡AGV鍙栨秷";
+                        LogHelper.Info(simpleResult.resultMsg);
+                        return simpleResult;
+                    }
+
+                }
+                else
+                {
+                    simpleResult.resultCode = 3;
+                    simpleResult.resultMsg = $"浜哄伐鎵嬪姩PDA鍙栨秷浠诲姟锛�=鍙戠粰AGV鍙栨秷浠诲姟锛屽弬鏁版棤鏁�;
+                    LogHelper.Info(simpleResult.resultMsg);
+                    return simpleResult;
+                }
+            }
+            catch (Exception ex)
+            {
+                simpleResult.resultCode = -1;
+                simpleResult.resultMsg = $"鍙戠敓浜嗗紓甯竰ex.Message}";
+                LogHelper.Info(simpleResult.resultMsg);
+                return simpleResult;
+            }
+        }
+    }
+}
diff --git a/Models/BaseModel.cs b/Models/BaseModel.cs
new file mode 100644
index 0000000..a06762c
--- /dev/null
+++ b/Models/BaseModel.cs
@@ -0,0 +1,42 @@
+锘縰sing System;
+
+using SqlSugar;
+
+namespace HH.WCS.Mobox3.AnGang.Models {
+    /// <summary>
+    /// 銆愭鏋躲�妯℃澘鎶借薄绫伙細鍩烘湰琛ㄦ暟鎹ā鍨�+    /// </summary>
+    public abstract class BaseModel {
+
+        /// <summary>
+        /// 鍞竴璇嗗埆鐮侊紙搴曞眰涓婚敭锛�+        /// </summary>
+        [SugarColumn(IsPrimaryKey = true)]
+        public string S_ID { get; set; } = Guid.NewGuid().ToString("D");
+
+        /// <summary>
+        /// 鍒涘缓浜�ID
+        /// </summary>
+        public string S_CREATOR_ID { get; set; } = "sa";
+
+        /// <summary>
+        /// 鍒涘缓浜哄悕绉�+        /// </summary>
+        public string S_CREATOR_NAME { get; set; } = "瓒呯骇鐢ㄦ埛";
+
+        /// <summary>
+        /// 鍒涘缓鏃堕棿
+        /// </summary>
+        public DateTime T_CREATE { get; set; } = DateTime.Now;
+
+        /// <summary>
+        /// 淇敼鏃堕棿
+        /// </summary>
+        public DateTime T_MODIFY { get; set; } = DateTime.Now;
+
+        /// <summary>
+        /// 鏁版嵁鐘舵�锛氱紪杈戙�瀹氱増
+        /// </summary>
+        public string S_STATE { get; set; } = "缂栬緫";
+    }
+}
diff --git a/Models/TN_CAR_IN.cs b/Models/TN_CAR_IN.cs
new file mode 100644
index 0000000..6943991
--- /dev/null
+++ b/Models/TN_CAR_IN.cs
@@ -0,0 +1,19 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Models
+{
+    /// <summary>
+    /// 瀹瑰櫒鐢熶骇杞︽暟鍏宠仈瀛愯〃
+    /// </summary>
+    [SugarTable("TN_CAR_IN")]
+    public class TN_CAR_IN : BaseModel {
+        public string S_CNTR_CODE { set; get; }//瀹瑰櫒鍙�+        public string S_CAR_CODE { set; get; }//鐢熶骇杞︽暟锛岄�鍙峰垎鍓�+        public string S_B_STATE { set; get; }//鐘舵�
+    }
+}
diff --git a/Models/TN_CG_Detail.cs b/Models/TN_CG_Detail.cs
new file mode 100644
index 0000000..cef0573
--- /dev/null
+++ b/Models/TN_CG_Detail.cs
@@ -0,0 +1,42 @@
+using SqlSugar;
+
+namespace HH.WCS.Mobox3.AnGang.Models {
+    /// <summary>
+    /// 鐗╂枡-瀹瑰櫒 鍏崇郴琛�+    /// </summary>
+    /// <remarks>
+    /// CG = Cargo Goods 璐х墿鍟嗗搧
+    /// </remarks>
+    [SugarTable("TN_CG_Detail")]
+    public class TN_CG_Detail : BaseModel
+    {
+        /// <summary>
+        /// 璐у搧 ID
+        /// </summary>
+        public string S_CG_ID { get; set; }
+
+        public string S_CAR_CODE { get; set; }//杞﹀彿
+       
+        public string S_CNTR_CODE { get; set; }//瀹瑰櫒缂栫爜
+
+        public string S_ITEM_CODE { get; set; }//璐у搧缂栫爜
+
+        public string S_ITEM_SPEC { get; set; }//璐у搧瑙勬牸
+
+        /// <summary>
+        /// 璐у搧鐘舵�锛�鍚堟牸 1寰呮 2涓嶅悎鏍�3姝e湪妫�獙锛涗笅绾垮嵆寰呮
+        /// </summary>
+        public string S_ITEM_STATE { get; set; }
+
+        /// <summary>
+        /// 璐у搧鐘舵�_瀛楀吀锛�鍚堟牸 1寰呮 2涓嶅悎鏍�3姝e湪妫�獙锛涗笅绾垮嵆寰呮
+        /// </summary>
+        public int N_ITEM_STATE { get; set; }
+
+        public string S_BATCH_NO { get; set; }//鎵规鍙�+        
+        public float F_QTY { get; set; }//鏁伴噺
+
+        public string S_SPE { get; set; }//瑙勬牸
+    }
+}
diff --git a/Models/TN_Container.cs b/Models/TN_Container.cs
new file mode 100644
index 0000000..4f0cc79
--- /dev/null
+++ b/Models/TN_Container.cs
@@ -0,0 +1,15 @@
+using SqlSugar;
+using System.Collections.Generic;
+
+namespace HH.WCS.Mobox3.AnGang.Models {
+    [SugarTable("TN_Container")]
+    public class TN_Container : BaseModel {
+        public string S_CODE { get; set; }
+
+        public int N_DETAIL_COUNT { get; set; }
+
+        [SugarColumn(IsIgnore = true)]
+        [Navigate(NavigateType.OneToMany, nameof(TN_CG_Detail.S_CNTR_CODE), nameof(S_CODE))]
+        public List<TN_CG_Detail> CntrItemRels { get; set; }
+    }
+}
diff --git a/Models/TN_Loc_Container.cs b/Models/TN_Loc_Container.cs
new file mode 100644
index 0000000..ff07b70
--- /dev/null
+++ b/Models/TN_Loc_Container.cs
@@ -0,0 +1,20 @@
+using SqlSugar;
+using System.Collections.Generic;
+
+namespace HH.WCS.Mobox3.AnGang.Models {
+    //TN_Loc_Container
+    //LocCntrRel
+    [SugarTable("TN_Loc_Container")]
+    public class TN_Loc_Container : BaseModel
+    {      
+        public string S_LOC_CODE { get; set; }
+        public string S_CNTR_CODE { get; set; }
+
+
+        [Navigate(NavigateType.OneToMany, nameof(TN_CG_Detail.S_CNTR_CODE))]
+        public List<TN_CG_Detail> CntrItemRels { get; set; }
+
+        [Navigate(NavigateType.OneToOne, nameof(S_CNTR_CODE))]
+        public TN_Container Container { get; set; }
+    }
+}
diff --git a/Models/TN_Location.cs b/Models/TN_Location.cs
new file mode 100644
index 0000000..9a097ba
--- /dev/null
+++ b/Models/TN_Location.cs
@@ -0,0 +1,87 @@
+using SqlSugar;
+using System.Collections.Generic;
+
+namespace HH.WCS.Mobox3.AnGang.Models {
+
+    [SugarTable("TN_Location")]
+    public class TN_Location : BaseModel {
+        /// <summary>
+        /// 璐т綅 ID
+        /// </summary>
+        public string S_CODE { get; set; }
+
+        /// <summary>
+        /// 璐т綅鍚嶇О
+        /// </summary>
+        public string S_NAME { get; set; }
+
+        /// <summary>
+        /// 璐т綅鎵�湪鍖哄煙 ID
+        /// </summary>
+        public string S_AREA_CODE { get; set; }
+
+        /// <summary>
+        /// 鍥借嚜 AGV 瀵瑰簲鐨勫簱浣嶅悕绉�+        /// </summary>
+        public string S_AGV_SITE { get; set; }
+
+        /// <summary>
+        /// 璐т綅瀹归噺
+        /// </summary>
+        public int N_CAPACITY { get; set; } = 1;
+
+        /// <summary>
+        /// 璐т綅褰撳墠瀹瑰櫒鏁伴噺
+        /// </summary>
+        public int N_CURRENT_NUM { get; set; } = 0;
+
+        /// <summary>
+        /// 璐т綅鐨勫眰鏁�+        /// </summary>
+        public int N_LAYER { get; set; } = 1;
+
+        /// <summary>
+        /// 0鏃�1鍏ュ簱閿�2鍑哄簱閿�3鍏跺畠閿�+        /// </summary>
+        public int N_LOCK_STATE { get; set; } = 0;
+
+        /// <summary>
+        /// 0"鏃� 1"鍏ュ簱閿� 2"鍑哄簱閿� 3"鍏跺畠閿�
+        /// </summary>
+        public string S_LOCK_STATE { get; set; } = "鏃�;
+
+        /// <summary>
+        /// 璐т綅鏄惁鍚敤锛歒鍚敤
+        /// </summary>
+        public string C_ENABLE { get; set; } = "Y";
+
+        /// <summary>
+        /// 閿佺殑鏉ユ簮-浠诲姟鍙�+        /// </summary>
+        public string S_LOCK_OP { get; set; }
+
+        [Navigate(NavigateType.OneToMany, nameof(TN_Loc_Container.S_LOC_CODE))]
+        public List<TN_Loc_Container> LocCntrRels { get; set; }
+
+        public static string GetLockStateStr(int lockState) {
+            var str = "";
+            switch (lockState) {
+                case 0: str = "鏃�; break;
+                case 1: str = "鍏ュ簱閿�; break;
+                case 2: str = "鍑哄簱閿�; break;
+                case 3: str = "鍏跺畠閿�; break;
+            }
+            return str;
+        }
+
+        /// <summary>
+        /// 璐ф灦缂栫爜
+        /// </summary>
+        public string S_SHELF_CODE { get; set; }
+
+        /// <summary>
+        /// 璐т綅楂樺害
+        /// </summary>
+        public int N_HEIGHT { get; set; }
+    }
+}
diff --git a/Models/TN_Task.cs b/Models/TN_Task.cs
new file mode 100644
index 0000000..53fba52
--- /dev/null
+++ b/Models/TN_Task.cs
@@ -0,0 +1,61 @@
+using SqlSugar;
+using System;
+
+namespace HH.WCS.Mobox3.AnGang.Models {
+    [SugarTable("TN_Task")]
+    public class TN_Task : BaseModel {
+
+        public string S_START_AREA { get; set; }
+        public string S_END_AREA { get; set; }
+        public string S_START_LOC { get; set; }
+        public string S_END_LOC { get; set; }
+    
+        public DateTime? T_START_TIME { get; set; }
+        public DateTime? T_END_TIME { get; set; }
+        /// <summary>
+        /// AGV 杞﹀彿
+        /// </summary>
+        public string S_EQ_NO { get; set; }
+        public string S_TYPE { get; set; }
+        public string S_B_STATE { get; set; } = "绛夊緟";
+        /// <summary>
+        /// 0绛夊緟  1宸叉帹閫� 2鎵ц  3瀹屾垚    4閿欒
+        /// </summary>
+        public int N_B_STATE { get; set; }
+   
+        /// <summary>
+        ///0鏃�1NDC 2澶╃洰 3鍥借嚜 4PLC 5鏉ゥ
+        /// </summary>
+        public int N_SCHEDULE_TYPE { get; set; }
+     
+        public int N_PRIORITY { get; set; }
+     
+        public string S_CODE { get; set; }
+        public string S_EQ_TASK_CODE { get; set; }
+
+        public string S_CNTR_CODE { get; set; }
+        public string S_OP_NAME { get; set; }
+    
+        public int N_START_LAYER { get; internal set; }
+        public int N_END_LAYER { get; internal set; }
+        public int N_CNTR_COUNT { get; internal set; }
+
+        /// <summary>
+        /// 浠诲姟鐨勮揣鐗╅噸閲�+        /// </summary>
+        public float F_WEIGHT { get; set; }
+
+        internal static string GetStateStr(int state) {
+            //0绛夊緟	  1宸叉帹閫�    2鎵ц    3瀹屾垚    4閿欒
+            var status = "";
+            switch (state) {
+                case 0: status = "绛夊緟"; break;
+                case 1: status = "宸叉帹閫�; break;
+                case 2: status = "鎵ц"; break;
+                case 3: status = "瀹屾垚"; break;
+                case 4: status = "閿欒"; break;
+            }
+            return status;
+        }
+    }
+}
diff --git a/Models/TN_Task_Action.cs b/Models/TN_Task_Action.cs
new file mode 100644
index 0000000..ca96775
--- /dev/null
+++ b/Models/TN_Task_Action.cs
@@ -0,0 +1,19 @@
+using SqlSugar;
+
+namespace HH.WCS.Mobox3.AnGang.Models {
+    [SugarTable("TN_Task_Action")]
+    public  class TN_Task_Action : BaseModel
+    {
+        /// <summary>
+        /// 灏忚溅绫诲瀷 e.g. "agv"
+        /// </summary>
+        public string S_EQ_TYPE { get; set; }
+        public string S_DATA { get; set; }
+      
+        public string S_TASK_CODE { get; set; }
+        public string S_EQ_CODE { get; set; }
+      
+        
+        public int N_ACTION_CODE { get; set; }
+    }
+}
diff --git a/Models/TN_WorkOrder.cs b/Models/TN_WorkOrder.cs
new file mode 100644
index 0000000..ea9794f
--- /dev/null
+++ b/Models/TN_WorkOrder.cs
@@ -0,0 +1,17 @@
+using SqlSugar;
+
+namespace HH.WCS.Mobox3.AnGang.Models {
+    /// <summary>
+    /// 鐢熶骇宸ュ崟
+    /// </summary>
+    [SugarTable("TN_WorkOrder")]
+    public class TN_WorkOrder : BaseModel
+    {
+        public string S_WORK_NO { get; set; }//宸ュ崟鍙凤紝涓婚敭
+        public string S_B_STATE { get; set; }//宸ュ崟鐘舵�锛屾柊寤�寮�惎-鏆傚仠-瀹屾垚
+        public string S_ITEM_CODE { get; set; }//鐗╂枡缂栫爜
+        public string S_BATCH_CODE { get; set; }//鎵规鍙�+        public string S_ITEM_SPEC { get; set; }//瑙勬牸
+        public string S_LINE_NO { get; set; }//浜х嚎锛屼笉鑳戒负null
+    }
+}
diff --git a/Models/Table.cs b/Models/Table.cs
new file mode 100644
index 0000000..b80e9c1
--- /dev/null
+++ b/Models/Table.cs
@@ -0,0 +1,26 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.Models.Basic {
+    /// <summary>
+    /// 鍩烘湰琛ㄦ暟鎹被
+    /// </summary>
+    public class BaseModel {
+
+        [SugarColumn(IsPrimaryKey = true)]
+        public string S_ID { get; set; } = Guid.NewGuid().ToString("D");
+        public string S_CREATOR_ID { get; set; } = "sa";
+        public string S_CREATOR_NAME { get; set; } = "瓒呯骇鐢ㄦ埛";
+        public DateTime T_CREATE { get; set; } = DateTime.Now;
+        public DateTime T_MODIFY { get; set; } = DateTime.Now;
+
+        /// <summary>
+        /// 缂栬緫銆佸畾鐗�+        /// </summary>
+        public string S_STATE { get; set; } = "缂栬緫";
+    }
+}
diff --git a/Program.cs b/Program.cs
new file mode 100644
index 0000000..40608f4
--- /dev/null
+++ b/Program.cs
@@ -0,0 +1,163 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+
+using HH.WCS.Mobox3.AnGang.AppStart;
+using HH.WCS.Mobox3.AnGang.Devices;
+
+using Microsoft.Owin.Hosting;
+
+using Topshelf;
+
+namespace HH.WCS.Mobox3.AnGang {
+    internal class Program
+    {
+        static void Main(string[] args)
+        {
+            //鍩虹璁剧疆淇℃伅鍒濆鍖�+            Settings.Init();
+            //1.0 寮�惎api
+            Startup();
+            //2.0 寮�惎tcp
+            StartTcp();
+            //3.0 寮�惎S7
+            StartS7();
+            //4.0 寮�惎Modbus
+            StartModbus();
+
+            //5.0 寮�惎绾跨▼
+            var rc = HostFactory.Run(x =>
+            {
+                x.Service<WorkThread>(s =>
+                {
+                    s.ConstructUsing(name => new WorkThread());
+                    s.WhenStarted(tc => tc.Start());
+                    s.WhenStopped(tc => tc.Stop());
+                });
+                x.RunAsLocalSystem();
+
+                x.SetDescription("hh123");
+                x.SetDisplayName("hh123.wms");
+                x.SetServiceName("hh123.wms");
+            });
+
+            var exitCode = (int)Convert.ChangeType(rc, rc.GetTypeCode());
+            Environment.ExitCode = exitCode;
+
+        }
+
+        /// <summary>
+        /// 寮�惎API鍗忚閫氳
+        /// </summary>
+        private static void Startup()
+        {
+            Console.WriteLine("Startup ApiController");
+            Task.Run(() =>
+            {
+                var url = Settings.Config.WebApiUrl;
+                Console.WriteLine(url);
+                using (WebApp.Start<Startup>(url))
+                {
+                    Console.WriteLine("API,Running on {0}", url);
+                    Console.ReadLine();
+                }
+            });
+        }
+        
+        /// <summary>
+        /// 寮�惎TCP鍗忚閫氳锛屾湇鍔$
+        /// </summary>
+        private static void StartTcp()
+        {
+            var tcpServerIP = Settings.Config.TCPServerIP;
+            var tcpServerPort = Settings.Config.TCPServerPort;
+            new TcpServer(tcpServerIP, tcpServerPort);
+
+        }
+
+        /// <summary>
+        /// 寮�惎S7鍗忚閫氳
+        /// </summary>
+        private static void StartS7()
+        {
+            //鎵�湁鐨凷7璁惧
+            //var allPLCDevice = Settings.ProductionLines;
+
+            //if (allPLCDevice.Count > 0)
+            //{
+            //    foreach (var item in allPLCDevice)
+            //    {
+            //        new S7Helper(item.ProductionLine_IP, (short)item.ProductionLine_Rack, (short)item.ProductionLine_Slot);
+            //        Console.WriteLine("S7ProductionLineHelper," + item.ProductionLine_IP);
+            //    }
+            //}
+
+            ////绉伴噸鐨凷7璁惧
+            //var weightPLCDevice = Settings.WeightDevices;
+
+            //if (weightPLCDevice.Count > 0)
+            //{
+            //    foreach (var item in weightPLCDevice)
+            //    {
+            //        new S7Helper(item.WeightDevice_IP, (short)item.WeightDevice_Rack, (short)item.WeightDevice_Slot);
+            //        Console.WriteLine("S7WeightDeviceHelper," + item.WeightDevice_Name);
+            //    }
+            //}
+        }
+
+        /// <summary>
+        /// 寮�惎Modbus鍗忚閫氳
+        /// </summary>
+        private static void StartModbus()
+        {
+            //鎵�湁鐨凪odbus璁惧
+            //var allPLCDevice = Settings.ProductionLines;
+
+            //if (allPLCDevice.Count > 0) {
+            //    foreach (var item in allPLCDevice) {
+            //        new ModbusHelper(item.PlcIp, item.PlcPort);
+            //        Console.WriteLine("ModbusHelper," + item.PlcIp);
+            //    }
+            //}
+        }
+
+        public class WorkThread
+        {
+            public void Start()
+            {
+                List<Task> tasks = new List<Task>();
+                // 娣诲姞浠诲姟鎺ㄩ�绾跨▼
+                //tasks.Add(GetTask(WCSCore.Dispatch));
+
+                ////娣诲姞鑷畾涔夌嚎绋�+                //tasks.Add(GetTask(Monitor.CheckEmptyCnt));//妫�祴绌烘墭鐩�+
+                ////鏍规嵁S7/Modbus鍗忚鍒ゆ柇杈撻�绾跨殑淇″彿  鍘熸潗鏂欎骇绾垮簱鍖�>婊℃墭缂撳瓨搴撳尯锛岀┖鎵樼紦瀛樺簱鍖�>鍘熸潗鏂欎骇绾垮簱鍖�+                //tasks.Add(GetTask(Monitor.CheckS7Devices));
+
+                Task.WaitAll(tasks.ToArray());
+            }
+            public void Stop() { Console.WriteLine("work stopped"); }
+            private Task GetTask(Action action)
+            {
+                var task = Task.Run(() =>
+                {
+                    while (true)
+                    {
+                        try
+                        {
+                            action();
+                        }
+                        catch (Exception ex)
+                        {
+                            LogHelper.Error(ex.Message, ex);
+                        }
+                        Thread.Sleep(3000);
+                    }
+                });
+                return task;
+            }
+        }
+    }
+}
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..71b07bb
--- /dev/null
+++ b/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 鏈夊叧绋嬪簭闆嗙殑涓�埇淇℃伅鐢变互涓�+// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�鍙慨鏀�+// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭�
+[assembly: AssemblyTitle("HH.WCS.Mobox3.DSZSH")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HH.WCS.Mobox3.DSZSH")]
+[assembly: AssemblyCopyright("Copyright 漏  2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 灏�ComVisible 璁剧疆涓�false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷
+//瀵�COM 缁勪欢涓嶅彲瑙併�濡傛灉闇�浠�COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷
+//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规�璁剧疆涓�true銆�+[assembly: ComVisible(false)]
+
+// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID
+[assembly: Guid("8e589c0d-7d65-474d-8ced-e34e087126a1")]
+
+// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�缁勬垚: 
+//
+//      涓荤増鏈�+//      娆$増鏈�+//      鐢熸垚鍙�+//      淇鍙�+//
+//鍙互鎸囧畾鎵�湁杩欎簺鍊硷紝涔熷彲浠ヤ娇鐢ㄢ�鐢熸垚鍙封�鍜屸�淇鍙封�鐨勯粯璁ゅ�
+//閫氳繃浣跨敤 "*"锛屽涓嬫墍绀�
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ServiceCore/Monitor.cs b/ServiceCore/Monitor.cs
new file mode 100644
index 0000000..c0eedd5
--- /dev/null
+++ b/ServiceCore/Monitor.cs
@@ -0,0 +1,171 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Devices;
+using HH.WCS.Mobox3.AnGang.process;
+using HH.WCS.Mobox3.AnGang.config;
+using HH.WCS.Mobox3.AnGang.Helper;
+using Newtonsoft.Json;
+using Opc.Ua.Client;
+using Opc.Ua;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using Org.BouncyCastle.Ocsp;
+using S7.Net.Types;
+using Opc.Ua.Configuration;
+using static System.Net.Mime.MediaTypeNames;
+using SqlSugar.Extensions;
+using static HH.WCS.Mobox3.AnGang.Dispatch.NDC;
+using Newtonsoft.Json.Linq;
+using HH.WCS.Mobox3.AnGang.Models;
+using SqlSugar;
+using HH.WCS.Mobox3.AnGang.Controllers;
+using HH.WCS.Mobox3.AnGang.Dispatch;
+
+using HH.WCS.Mobox3.AnGang.Consts;
+
+namespace HH.WCS.Mobox3.AnGang.ServiceCore
+{
+    /// <summary>
+    /// 瀹氭椂杞浠诲姟
+    /// </summary>
+    public class Monitor
+    {
+    
+
+        
+
+        ///// <summary>
+        ///// 绌烘墭鍫嗗彔鍏ュ簱
+        ///// </summary>
+        //internal static void CheckEmptyCnt()
+        //{
+        //    var db = DbHelper.GetDbClient();
+
+        //    try
+        //    {
+        //        var startLoc = db.Queryable<TN_Location>().
+        //        Where(a => a.S_AREA_CODE == Settings.Areas[3] && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y" && a.N_CURRENT_NUM == a.N_CAPACITY).
+        //        OrderBy(a => a.T_MODIFY, OrderByType.Desc).
+        //        First();
+        //        if (startLoc == null)
+        //        {
+        //            LogHelper.Info($"绌烘墭鍫嗗彔鍖簕Settings.Areas[3]}鏆傛棤鍫嗘弧鐨勭┖鎵�);
+        //            return;
+        //        }
+
+        //        var endLoc = db.Queryable<TN_Location>().
+        //            Where(a => a.S_AREA_CODE == Settings.Areas[4] && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y" && a.N_CURRENT_NUM == 0).
+        //            OrderBy(a => a.N_CURRENT_NUM, OrderByType.Asc).
+        //            First();
+
+        //        if (endLoc == null)
+        //        {
+        //            LogHelper.Info($"鏈壘鍒板悎閫傜殑缁堢偣璐т綅锛岄渶婊¤冻{Settings.Areas[4]}閲屾湁鏈攣瀹氫笖褰撳墠鏁伴噺绛変簬0鐨勮揣浣�);
+        //            return;
+        //        }
+
+        //        var cntrList = db.Queryable<TN_Loc_Container>().Where(a => a.S_LOC_CODE == startLoc.S_CODE).OrderBy(a => a.T_CREATE, OrderByType.Asc).ToList();
+
+        //        if (cntrList.Count < 1)
+        //        {
+        //            LogHelper.Info($"璧风偣{startLoc.S_CODE}鏈壘鍒拌揣浣嶅鍣ㄥ叧绯讳俊鎭�);
+        //            return;
+        //        }
+
+        //        string cntrString = "";
+        //        for (int i = 0; i < cntrList.Count; i++)
+        //        {
+        //            if (i == cntrList.Count - 1)//鏈�悗涓�釜瀛楃涓茶繛鎺ヤ笉鍔犻�鍙�+        //            {
+        //                cntrString += cntrList[i].S_CNTR_CODE;
+        //            }
+        //            else
+        //            {
+        //                cntrString += cntrList[i].S_CNTR_CODE + ",";
+        //            }
+        //        }
+
+        //        if (WCSHelper.CreateTask(startLoc.S_CODE, endLoc.S_CODE, "绌烘墭鍫嗗彔鍏ュ簱", 3, cntrString))//鍒涘缓鎼�浠诲姟锛岃捣鐐圭粓鐐瑰鍣�+        //        {
+        //            LocationHelper.LockLoc(startLoc.S_CODE, 2);//璧风偣鍑哄簱閿侊紝
+        //            LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+        //            LogHelper.Info($"鐢熸垚绌烘墭鍫嗗彔鍏ュ簱浠诲姟鎴愬姛锛屽鍣細{cntrString}锛岃捣鐐癸細{startLoc.S_CODE}");
+        //        }
+        //        else
+        //        {
+        //            LogHelper.Info($"鐢熸垚绌烘墭鍫嗗彔鍏ュ簱浠诲姟澶辫触锛屽鍣細{cntrString}锛岃捣鐐癸細{startLoc.S_CODE}");
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        LogHelper.Info($"绌烘墭鍫嗗彔鍏ュ簱寮傚父锛歿ex.Message}");
+        //    }
+
+        //}
+    }
+
+    /// <summary>
+    /// 涓嶴7璁惧浜や簰鏃剁殑model
+    /// </summary>
+    public class CheckDeciveModel
+    {
+        /// <summary>
+        /// 蹇冭烦
+        /// </summary>
+        public int Heart { set; get; }
+
+        /// <summary>
+        /// RFID锛屾槸瀹瑰櫒鏄墭鐩�+        /// </summary>
+        public string RfidData { set; get; }
+
+        /// <summary>
+        /// 鍏佽涓婁笅鏂� 0=鏃犱换鍔★紝11=涓婃枡锛�1=涓嬫枡锛岋紙璇锋眰AGV宸ヤ綔锛�+        /// </summary>
+        public int AgvAllow { set; get; }
+
+        /// <summary>
+        /// 浠诲姟灞炴�  1 OK锛�绉伴噸澶辫触锛�鏉$爜澶辫触锛� RFID璇诲彇澶辫触
+        /// </summary>
+        public int TaskProperties { set; get; }
+
+        /// <summary>
+        /// 鍑嗗灏辩华  0=鏈噯澶囧ソ锛�=鍑嗗濂�+        /// </summary>
+        public int Ready { set; get; }
+
+        /// <summary>
+        /// 杞借揣鐘舵� 0=杈撻�绾挎棤浜у搧锛�=杈撻�绾挎湁浜у搧
+        /// </summary>
+        public int CargoStatus { set; get; }
+
+        /// <summary>
+        /// 宸ヤ綅鐘舵� 0寰呮満涓紝1鍏ュ簱鏂瑰悜杩愯涓紝2鍑哄簱鏂瑰悜杩愯涓紝3璁惧鏁呴殰
+        /// </summary>
+        public int StationStatus { set; get; }
+
+        /// <summary>
+        /// 鍘诲悜璇锋眰 0寰呮満涓紝1鍒颁綅璇锋眰
+        /// </summary>
+        public int DestinationRequests { set; get; }
+
+        /// <summary>
+        /// 鎵爜淇℃伅 鎵爜鏋弽棣堜俊鎭�+        /// </summary>
+        public string BarcodeCode { set; get; }
+
+        /// <summary>
+        /// 閲嶉噺  
+        /// </summary>
+        public float Weight { set; get; }
+
+        /// <summary>
+        /// 浜х嚎鍦板潃
+        /// </summary>
+        public string LineIP { set; get; }
+    }
+}
+
diff --git a/ServiceCore/WCSCore.cs b/ServiceCore/WCSCore.cs
new file mode 100644
index 0000000..da80ddd
--- /dev/null
+++ b/ServiceCore/WCSCore.cs
@@ -0,0 +1,205 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Devices;
+using HH.WCS.Mobox3.AnGang.Dispatch;
+using HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.process;
+using HH.WCS.Mobox3.AnGang.config;
+using HH.WCS.Mobox3.AnGang.Helper;
+using Newtonsoft.Json;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using static HH.WCS.Mobox3.AnGang.Controllers.ApiModel;
+using static HH.WCS.Mobox3.AnGang.Dtos.Response.AgvResponse;
+using static HH.WCS.Mobox3.AnGang.Dtos.Request.AgvRequest;
+
+namespace HH.WCS.Mobox3.AnGang.ServiceCore
+{
+    internal class WCSCore
+    {
+        public static ReturnResult OperateAgvTaskStatus(AgvTaskState model)
+        {
+            var result = new ReturnResult();
+            try
+            {
+                switch (model.state) {
+                    case 1023:
+                    case 1025:
+
+                        break;
+                    case 1012:
+                        break;
+                    case 1004:
+                        break;
+                    case 1103:
+                        break;
+                    default:
+                        // AGV 鎵ц浠诲姟鐨勯�杈戝鐞�+                        if (!AgvTaskProcessOk(model)) {
+                            // 鎵ц涓峅K锛岃鏄庢病鏈夋壘鍒颁换鍔�+                            result.ResultCode = 1;
+                            result.ResultMsg = $"鏍规嵁Model.No鏈壘鍒板搴旂殑浠诲姟锛寋model.task_no}";
+                            LogHelper.Info(result.ResultMsg, "API");
+                            return result;
+                        }
+                        break;
+                }
+
+                result.ResultCode = 0;
+                result.ResultMsg = "success";
+                LogHelper.Info(result.ResultMsg, "API");
+                return result;
+            }
+            catch(Exception ex)
+            {
+                result.ResultCode = -1;
+                result.ResultMsg = $"鍙戠敓浜嗗紓甯革細{ex.Message}";
+                LogHelper.Info(result.ResultMsg, "Error");
+                return result;
+            }
+
+        }
+
+        /// <summary>
+        /// 鎵цAGV浠诲姟锛屾煡璇笉鍒颁换鍔¤繑鍥瀎alse
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        private static bool AgvTaskProcessOk(AgvTaskState model) {
+            var TN_Task = WCSHelper.GetTask(model.task_no); // 鏍规嵁褰撳墠model缂栧彿鏌ヨ浠诲姟
+            if (TN_Task == null) { return false; }
+
+            if (model.state > 7) {
+                //瀹夊叏璇锋眰绛�+                TaskHelper.OperateReq(model.task_no, model.state, model.forklift_no, model.ext_data);
+                return true;
+            }
+            
+            // AGV 浠诲姟 134562(7) 鐘舵�澶勭悊
+            switch (model.state) {
+                case 1:
+                    WCSHelper.Begin(TN_Task, model.forklift_no); // 宸叉帹閫佺殑浠诲姟鐨勭姸鎬佹敼鎴愭墽琛�+                    break;
+                case 3:
+                    WCSHelper.UpdateStatus(TN_Task, "寮�鍙栬揣"); // 浠诲姟鐘舵�鏀规垚寮�鍙栬揣
+                    break;
+                case 4:
+                    WCSHelper.UpdateStatus(TN_Task, "鍙栬揣瀹屾垚"); // 浠诲姟鐘舵�鏀规垚鍙栬揣瀹屾垚
+                    TaskHelper.OperateStatus(TN_Task, 4); // 璧风偣瀹瑰櫒璐т綅瑙g粦,瑙i攣璧风偣
+                    break;
+                case 5:
+                    WCSHelper.UpdateStatus(TN_Task, "寮�鍗歌揣"); // 浠诲姟鐘舵�鏀规垚寮�鍗歌揣
+                    break;
+                case 6:
+                    WCSHelper.UpdateStatus(TN_Task, "鍗歌揣瀹屾垚"); // 浠诲姟鐘舵�鏀规垚鍗歌揣瀹屾垚
+                    TaskHelper.OperateStatus(TN_Task, 6); // 缁堢偣瀹瑰櫒璐т綅缁戝畾,瑙i攣缁堢偣
+                    break;
+                case 2:
+                    WCSHelper.End(TN_Task); // 浠诲姟鐘舵�鏀规垚缁撴潫
+                    break;
+                case 7:
+                    TaskHelper.OperateStatus(TN_Task, 7); // 寮傚父澶勭悊
+                    WCSHelper.Fail(TN_Task); // 浠诲姟鐘舵�鏀规垚閿欒
+                    break;
+            }
+
+            WCSHelper.AddActionRecord(model.task_no, model.state, model.forklift_no, model.ext_data);
+            //璋冪敤绗笁鏂规帴鍙o紙濡傛灉鏈夛級TaskProcess.ReportStatus锛屾坊鍔犱换鍔″姩浣滃叧绯昏〃
+
+            return true;
+        }
+
+        /// <summary>
+        /// 浠诲姟鍒嗗彂锛屾牴鎹皟搴︾被鍨嬪彂缁欎笉鍚岀殑璋冨害绯荤粺
+        /// </summary>
+        internal static void Dispatch()
+        {
+            //鏌ヨ浠诲姟
+            //鑾峰彇鎵�湁绛夊緟鐨勪换鍔�+            var list = WCSHelper.GetWaitingTaskList();
+            LogHelper.Info("绛夊緟浠诲姟淇℃伅" + JsonConvert.SerializeObject(list), "API");
+            if (list.Count > 0)
+            {
+                list.ForEach(task =>
+                {
+                    //浣跨敤鑷畾涔変换鍔℃帹閫�+                    TaskHelper.SendTask(task);//璋冨害NDC鎴栨澀濂ユ垨鍥借嚜璁惧
+                    //TaskProcess.SendGZTask(task);///璋冨害鍥借嚜璁惧
+
+                });
+            }
+            else
+            {
+                LogHelper.Info("鏆傛棤浠诲姟");
+            }
+        }
+
+        
+
+        /// <summary>
+        /// 绌烘墭涓嬬嚎鍫嗗彔
+        /// </summary>
+        /// <param name="tN_Task"></param>
+        //public static void EmptyInStackArea(TN_Task tN_Task)
+        //{
+        //    if (tN_Task.S_TYPE == "婊℃墭鍑哄簱涓婄嚎")
+        //    {
+        //        var result = new SimpleResult();
+        //        var db = DbHelper.GetDbClient();
+        //        try
+        //        {
+        //            var startLocLists = 
+        //                db.Queryable<TN_Location>().Where(a => a.S_AREA_CODE == Settings.Areas[6] && a.N_CURRENT_NUM >0 && a.N_LOCK_STATE==0 && a.S_LOCK_STATE == "鏃�).ToList();
+
+        //            if (startLocLists.Count == 0)
+        //            {
+        //                LogHelper.Info($"浜哄伐鎵樼洏鍖烘殏鏃犲凡缁戝畾鐨勭┖鎵橈紝闇�婊¤冻锛氳揣浣嶆暟閲忓ぇ浜�锛屾湭閿佸畾鐨勶紝灞炰簬搴撳尯{Settings.Areas[6]}鐨勮揣浣�);
+        //                return;
+        //            }
+
+        //            foreach (var item in startLocLists)
+        //            {
+        //                //鏌ヨ绗﹀悎鐨勬湭閿佸畾宸插惎鐢ㄦ寚瀹氳揣鍖虹殑褰撳墠鏁伴噺鍚堣鍚庢渶鎺ヨ繎瀹归噺鐨勮揣浣嶏紝缁堢偣
+        //                var endLoc = db.Queryable<TN_Location>().
+        //                    Where(a => a.N_CURRENT_NUM + item.N_CURRENT_NUM <= a.N_CAPACITY && a.S_AREA_CODE == Settings.Areas[3] && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y").
+        //                    OrderBy(a => a.N_CURRENT_NUM + item.N_CURRENT_NUM - a.N_CAPACITY, OrderByType.Desc).First();
+
+        //                if (endLoc == null)
+        //                {
+        //                    LogHelper.Info($"鏈壘鍒板悎閫傜殑缁堢偣锛岄渶瑕佹弧瓒筹細灞炰簬{Settings.Areas[3]}鐨勬湭閿佸畾鐨勫閲忓厖瓒崇殑璐т綅");
+        //                    continue;
+        //                }
+        //                var locCnt = db.Queryable<TN_Loc_Container>().First(a=>a.S_LOC_CODE == item.S_CODE);
+
+        //                if (locCnt == null)
+        //                {
+        //                    LogHelper.Info($"璐т綅{item.S_CODE}鏈粦瀹氬鍣�);
+        //                    continue;
+        //                }
+
+        //                //鍒涘缓绌烘墭涓嬬嚎鍫嗗彔浠诲姟
+        //                if (WCSHelper.CreateTask(item.S_CODE, endLoc.S_CODE, "绌烘墭涓嬬嚎鍫嗗彔", 3, locCnt.S_CNTR_CODE))//鍒涘缓鎼�浠诲姟锛岃捣鐐圭粓鐐瑰鍣�+        //                {
+        //                    LocationHelper.LockLoc(item.S_CODE, 2);//璧风偣鍑哄簱閿侊紝
+        //                    LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+        //                    LogHelper.Info($"鐢熸垚绌烘墭涓嬬嚎鍫嗗彔浠诲姟鎴愬姛锛屽鍣ㄥ彿{locCnt.S_CNTR_CODE}锛岃捣鐐箋item.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+        //                }
+        //                else
+        //                {
+        //                    LogHelper.Info($"鐢熸垚绌烘墭涓嬬嚎鍫嗗彔浠诲姟澶辫触锛屽鍣ㄥ彿{locCnt.S_CNTR_CODE}锛岃捣鐐箋item.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+        //                    continue;
+        //                }
+        //            }
+        //        }
+        //        catch (Exception ex)
+        //        {
+        //            LogHelper.Info($"鍙戠敓浜嗗紓甯革細{ex.Message}", "Error");
+        //        }
+        //    }
+        //}
+
+        
+    }
+}
diff --git a/ServiceCore/WMSCore.cs b/ServiceCore/WMSCore.cs
new file mode 100644
index 0000000..72f73ba
--- /dev/null
+++ b/ServiceCore/WMSCore.cs
@@ -0,0 +1,15 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Helper;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.WCS.Mobox3.AnGang.ServiceCore {
+    internal class WMSCore 
+    {
+       
+
+    }
+}
diff --git a/Services/AgvService.cs b/Services/AgvService.cs
new file mode 100644
index 0000000..50d342f
--- /dev/null
+++ b/Services/AgvService.cs
@@ -0,0 +1,230 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Helpers;
+using HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.process;
+using HH.WCS.Mobox3.AnGang.config;
+using HH.WCS.Mobox3.AnGang.Helper;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using static HH.WCS.Mobox3.AnGang.Dtos.Request.AgvRequest;
+using static HH.WCS.Mobox3.AnGang.Dtos.Response.AgvResponse;
+using HH.WCS.Mobox3.AnGang.Consts;
+using HH.WCS.Mobox3.AnGang.Dispatch;
+
+namespace HH.WCS.Mobox3.AnGang.Services {
+    public class AgvService {
+        public static ReturnResult OperateAgvTaskStatus(AgvTaskState model) {
+            var result = new ReturnResult();
+            try {
+                switch (model.state) {
+                    case 1023:
+                    case 1025:
+
+                        break;
+                    case 1012:
+                        break;
+                    case 1004:
+                        break;
+                    case 1103:
+                        break;
+                    default:
+                        // AGV 鎵ц浠诲姟鐨勯�杈戝鐞�+                        if (!AgvTaskProcessOk(model)) {
+                            // 鎵ц涓峅K锛岃鏄庢病鏈夋壘鍒颁换鍔�+                            result.ResultCode = 1;
+                            result.ResultMsg = $"鏍规嵁Model.No鏈壘鍒板搴旂殑浠诲姟锛寋model.task_no}";
+                            LogHelper.Info(result.ResultMsg, "API");
+                            return result;
+                        }
+                        break;
+                }
+
+                result.ResultCode = 0;
+                result.ResultMsg = "success";
+                LogHelper.Info(result.ResultMsg, "API");
+                return result;
+            }
+            catch (Exception ex) {
+                result.ResultCode = -1;
+                result.ResultMsg = $"鍙戠敓浜嗗紓甯革細+{ex.Message}";
+                LogHelper.Info(result.ResultMsg, "Error");
+                return result;
+            }
+
+        }
+
+        /// <summary>
+        /// 鎵ц AGV 浠诲姟锛屾煡璇笉鍒颁换鍔¤繑鍥�<see langword="false"/>
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static bool AgvTaskProcessOk(AgvTaskState model) {
+            var TN_Task = WCSHelper.GetTask(model.task_no); // 鏍规嵁褰撳墠model缂栧彿鏌ヨ浠诲姟
+            if (TN_Task == null) { return false; }
+
+            if (model.state > 7) {
+                //瀹夊叏璇锋眰绛�+                TaskHelper.OperateReq(model.task_no, model.state, model.forklift_no, model.ext_data);
+                return true;
+            }
+
+            // AGV 浠诲姟 134562(7) 鐘舵�澶勭悊
+            switch (model.state) {
+                case AgvStateCode.鎵ц:
+                    WCSHelper.Begin(TN_Task, model.forklift_no); // 宸叉帹閫佺殑浠诲姟鐨勭姸鎬佹敼鎴愭墽琛�+                    break;
+                case AgvStateCode.寮�鍙栬揣:
+                    WCSHelper.UpdateStatus(TN_Task, "寮�鍙栬揣"); // 浠诲姟鐘舵�鏀规垚寮�鍙栬揣
+                    break;
+                case AgvStateCode.鍙栬揣瀹屾垚:
+                    WCSHelper.UpdateStatus(TN_Task, "鍙栬揣瀹屾垚"); // 浠诲姟鐘舵�鏀规垚鍙栬揣瀹屾垚
+
+                    // TODO 鎷嶇収
+
+                    var setEndLocTask = Task.Run(() => {
+                        SetEndLoc(TN_Task);
+                    });
+
+                    TaskHelper.OperateStatus(TN_Task, 4); // 璧风偣瀹瑰櫒璐т綅瑙g粦,瑙i攣璧风偣
+                    break;
+                case AgvStateCode.寮�鍗歌揣:
+                    WCSHelper.UpdateStatus(TN_Task, "寮�鍗歌揣"); // 浠诲姟鐘舵�鏀规垚寮�鍗歌揣
+                    break;
+                case AgvStateCode.鍗歌揣瀹屾垚:
+                    WCSHelper.UpdateStatus(TN_Task, "鍗歌揣瀹屾垚"); // 浠诲姟鐘舵�鏀规垚鍗歌揣瀹屾垚
+                    TaskHelper.OperateStatus(TN_Task, 6); // 缁堢偣瀹瑰櫒璐т綅缁戝畾,瑙i攣缁堢偣
+                    break;
+                case AgvStateCode.瀹屾垚:
+                    WCSHelper.End(TN_Task); // 浠诲姟鐘舵�鏀规垚缁撴潫
+                    break;
+                case AgvStateCode.寮傚父:
+                    TaskHelper.OperateStatus(TN_Task, 7); // 寮傚父澶勭悊
+                    WCSHelper.Fail(TN_Task); // 浠诲姟鐘舵�鏀规垚閿欒
+                    break;
+            }
+
+            WCSHelper.AddActionRecord(model.task_no, model.state, model.forklift_no, model.ext_data);
+            //璋冪敤绗笁鏂规帴鍙o紙濡傛灉鏈夛級TaskProcess.ReportStatus锛屾坊鍔犱换鍔″姩浣滃叧绯昏〃
+
+            return true;
+        }
+
+        public static void SetEndLoc(TN_Task tn_task) {
+            // 鍙浠诲姟涓轰骇鍝佸叆搴�PDA)锛屽氨闇�閲嶆柊鎸囧畾缁堢偣锛堥粯璁ndLoc涓�"锛�+            if (tn_task.S_TYPE == "浜у搧鍏ュ簱(PDA)") {
+
+                var db = DbHelper.GetDbClient();
+                var endLoc = new TN_Location();
+
+                var data = GZRobot.CustomBuf();
+                var weight = float.Parse(data[0].parameter_varchar200_up);
+                tn_task.F_WEIGHT= weight;
+
+                // 鍙綋涔嬪墠鎸囧畾缁堢偣璐ф灦鍚庯紝鎵嶅皾璇曡绠楃粓鐐硅揣浣嶏紝鍚﹀垯浜ょ粰浜哄伐鍐冲畾
+                if (tn_task.S_END_AREA != "") {
+                    if (weight > 1500) {
+                        // 閲嶉噺瓒呰繃1.5t锛岄渶瑕侀�鎷�-3灞傝揣鏋�+                        endLoc = db.Queryable<TN_Location>().First(a => a.S_SHELF_CODE == tn_task.S_END_AREA && LocationHelper.IsFree(a) && a.N_CURRENT_NUM == 0 && a.N_HEIGHT <= 3);
+                    }
+                    else if (weight > 0) {
+                        // 閲嶉噺鏈秴杩�.5t锛屽湪鎸囧畾璐ф灦闅忎究閫夋嫨1涓�+                        endLoc = db.Queryable<TN_Location>().First(a => a.S_SHELF_CODE == tn_task.S_END_AREA && LocationHelper.IsFree(a) && a.N_CURRENT_NUM == 0);
+                    }
+                    else {
+                        // 娌℃湁鎺ユ敹鍒伴噸閲忥紝鎴栭噸閲忓嚭閿�+                        endLoc = null;
+                        LogHelper.Info($"閿欒鐨勯噸閲忎俊鎭細{weight}");
+                        return;
+                    }
+
+                    // 濡傛灉娌℃湁绗﹀悎鏉′欢鐨勮揣浣嶏紝缃┖锛岀瓑寰匬DA閲嶆柊纭畾
+                    if (endLoc == null) {
+                        tn_task.S_END_AREA = "";
+                        tn_task.S_END_LOC = "";
+
+                        // 涓嶉渶瑕佸啀缁橤Z AGV浼犵┖鍊硷紝涓�紑濮嬪氨娌$粰鍏蜂綋璐т綅锛屽彧缁欎簡Area
+
+                        //var request = new UpdateInteractInfo {
+                        //    interaction_info_id = 3, // 鏇存敼缁堢偣淇℃伅
+                        //    info_status = "active",
+                        //    return_value = "",
+                        //};
+
+                        //GZRobot.UpdateInteractInfo(request);
+
+                        using (var trans = db.Ado.UseTran()) {
+                            if (db.Updateable<TN_Task>(tn_task).UpdateColumns(it => new { it.S_END_LOC, it.F_WEIGHT })
+                                .ExecuteCommand() > 0) {
+                                //LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+                                trans.CommitTran();
+                                LogHelper.Info($"閲嶆柊璁$畻鍚庢病鏈夊悎閫傝揣浣嶏紝浠诲姟 {tn_task.S_CODE} 淇敼鎴愬姛锛屼慨鏀圭粓鐐硅揣鏋跺拰璐т綅涓虹┖");
+                            }
+                            else {
+                                trans.RollbackTran();
+                                LogHelper.Info($"閲嶆柊璁$畻鍚庢病鏈夊悎閫傝揣浣嶏紝浠诲姟 {tn_task.S_CODE} 淇敼澶辫触锛屼慨鏀圭粓鐐硅揣鏋跺拰璐т綅涓虹┖");
+                            }
+                        }
+                    }
+                    else {
+                        // 鎵惧埌鍚堥�鐨勮揣浣嶏紝鎺ㄩ�
+                        tn_task.S_END_LOC = endLoc.S_CODE;
+
+                        using (var trans = db.Ado.UseTran()) {
+                            if (db.Updateable<TN_Task>(tn_task).UpdateColumns(it => new {it.S_END_LOC, it.F_WEIGHT})
+                                .ExecuteCommand() > 0) {
+                                LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+                                trans.CommitTran();
+                                LogHelper.Info($"璁$畻璐т綅鎴愬姛锛屼换鍔�{tn_task.S_CODE} 淇敼鎴愬姛锛岀粓鐐硅揣鏋朵负 {endLoc.S_SHELF_CODE}锛屼慨鏀圭粓鐐逛綅缃负 {endLoc.S_CODE}");
+                            }
+                            else {
+                                trans.RollbackTran();
+
+                                LogHelper.Info($"璁$畻璐т綅鎴愬姛锛屼换鍔�{tn_task.S_CODE} 淇敼澶辫触锛岀粓鐐硅揣鏋朵负 {endLoc.S_SHELF_CODE}锛屼慨鏀圭粓鐐逛綅缃负 {endLoc.S_CODE}");
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        public static ReturnResult SafetyInteraction(SafetyInteractionInfo model) {
+            var gzResult = new ReturnResult();
+            //var db = DbHelper.GetDbClient();
+            //ModbusHelper.Relink();
+
+            //var productionLineInfo = Settings.ProductionLines[0];
+            //var prodLineDevice = new ProductionLineDevice(productionLineInfo.PlcIp, productionLineInfo.PlcPort);
+            //if (!prodLineDevice.LoadDeviceStateOk()) {
+            //    LogHelper.Info("鍔犺浇璁惧淇℃伅澶辫触");
+            //}
+
+            //var tn_task = db.Queryable<TN_Task>().First(a => a.S_CODE == model.task_no);
+            //if (tn_task == null) {
+            //    LogHelper.Info($"浠诲姟鍙�'{model.task_no}' 涓嶅瓨鍦�);
+            //}
+
+            //if (prodLineDevice.SystemState == 1
+            //    && prodLineDevice.FullOffline == 1 && tn_task.S_TYPE == "鎴愬搧鑳朵笅绾�鎵樼洏(WMS)") {
+            //    if (!prodLineDevice.SetAgvPicking(1)) {
+            //        LogHelper.Info("鍐欏叆杈撻�绾�PLC 澶辫触");
+            //    }
+            //}
+
+            //if (prodLineDevice.SystemState == 1
+            //    && prodLineDevice.AllowAgvPlacePallet == 1 && tn_task.S_TYPE == "绌烘墭鐩樹笂绾�WMS)") {
+            //    if (!prodLineDevice.SetAgvPlacingPallet(1)) {
+            //        LogHelper.Info("鍐欏叆杈撻�绾�PLC 澶辫触");
+            //    }
+            //}
+
+            //LogHelper.Info(JsonConvert.SerializeObject(prodLineDevice, Formatting.Indented));
+            return gzResult;
+        }
+    }
+}
diff --git a/Services/DebugService.cs b/Services/DebugService.cs
new file mode 100644
index 0000000..fbbad8d
--- /dev/null
+++ b/Services/DebugService.cs
@@ -0,0 +1,39 @@
+锘縰sing HH.WCS.Mobox3.AnGang.Models;
+using HH.WCS.Mobox3.AnGang.config;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HH.WCS.Mobox3.AnGang.Helpers;
+
+namespace HH.WCS.Mobox3.AnGang.Debug {
+    public class DebugService {
+        /// <summary>
+        /// 鍒濆鏁版嵁搴撳缓绔�+        /// </summary>
+        /// <returns></returns>
+        public string CreateDatabase() {
+            try {
+                var db = DbHelper.GetDbClient();
+
+                db.CodeFirst.InitTables<TN_CG_Detail>();
+                db.CodeFirst.InitTables<TN_WorkOrder>();
+                db.CodeFirst.InitTables<TN_CAR_IN>();
+                //db.CodeFirst.InitTables<SYSHelper.OI_SYS_MAXID>();
+                db.CodeFirst.InitTables<TN_Task_Action>();
+                db.CodeFirst.InitTables<TN_Task>();
+                db.CodeFirst.InitTables<TN_Location>();
+                db.CodeFirst.InitTables<TN_Loc_Container>();
+            }
+            catch (Exception ex) {
+                LogHelper.Info($"鍙戠敓浜嗗紓甯�);
+                return "鍒濆鍖栨暟鎹簱閿欒" + ex.Message;
+            }
+
+            return "鎴愬姛";
+        }
+
+
+    }
+}
diff --git a/Services/MoboxService.cs b/Services/MoboxService.cs
new file mode 100644
index 0000000..cf9255b
--- /dev/null
+++ b/Services/MoboxService.cs
@@ -0,0 +1,367 @@
+锘縰sing HH.WCS.Mobox3.AnGang.AppStart;
+using HH.WCS.Mobox3.AnGang.config;
+using HH.WCS.Mobox3.AnGang.Consts;
+using HH.WCS.Mobox3.AnGang.Helper;
+using HH.WCS.Mobox3.AnGang.Helpers;
+using HH.WCS.Mobox3.AnGang.Models;
+using Newtonsoft.Json;
+using System;
+using static HH.WCS.Mobox3.AnGang.Dtos.Request.MoboxRequest;
+using static HH.WCS.Mobox3.AnGang.Dtos.Response.MoboxResponse;
+using static HH.WCS.Mobox3.AnGang.Helpers.ResultHelper;
+
+namespace HH.WCS.Mobox3.AnGang.Services {
+    public class MoboxService {
+
+        /// <summary>
+        /// 浜у搧鍏ュ簱(PDA)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult InWarehouse(InWarehouseInfo model) {
+            LogHelper.Info("瑙﹀彂API锛氫骇鍝佸叆搴�PDA)" + JsonConvert.SerializeObject(model), "API");
+            var db = DbHelper.GetDbClient();
+            var startLoc = new TN_Location();
+            //var endLoc = new TN_Location();
+
+            try {
+                // 璧风偣浣嶇疆蹇呴』锛氫负绌恒�鏃犻攣銆佸惎鐢ㄣ�灞炰簬鏀跺彂鍖哄煙
+                startLoc = db.Queryable<TN_Location>().
+                    First(a => a.S_CODE == model.startLoc && a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y" && a.S_SHELF_CODE == AreaCode.鏀跺彂璐т綅鍖�;
+
+                if (startLoc == null) {
+                    return BuildSimpleResult(1, $"璧风偣浣嶇疆{model.startLoc}涓嶅瓨鍦紒");
+                }
+
+                //if (!LocationHelper.IsStartLocationTransferOk(model.startLoc, 
+                //    a => a.S_SHELF_CODE == Settings.Areas[0], 
+                //    out startLoc)) {
+                //    return BuildSimpleResult(1, $"璧风偣浣嶇疆{model.startLoc}涓嶅瓨鍦紒");
+                //}
+
+                // 瀹瑰櫒 ID 鍜�鐗╂枡 ID 鏈寚瀹氾紝鐢辩郴缁熺洿鎺ョ敓鎴�+                var cntID = Guid.NewGuid().ToString("D");
+                var CgId = Guid.NewGuid().ToString("D");
+
+                // 鍒濆鏄病鏈夌粦瀹氫俊鎭殑锛屽厛灏嗚捣鐐逛綅缃笌瀹瑰櫒缁戝畾锛屽鍣ㄤ笌鐗╂枡缁戝畾
+                var cntLoc = new TN_Loc_Container() {
+                    S_LOC_CODE = startLoc.S_CODE,
+                    S_CNTR_CODE = cntID,
+                };
+                var cgCnt = new TN_CG_Detail() {
+                    S_ITEM_CODE = CgId,
+                    S_CNTR_CODE = cntID,
+                };
+
+                var endArea = ""; // 榛樿缁堢偣鍖哄煙涓虹┖
+
+                // 鎸囧畾璐т綅鎺掑彿锛堜笉鑳戒负绌恒�绌哄瓧绗︿覆鎴栫┖鏍硷級
+                if (model.endShelf != null && model.endShelf.Trim() != "") {
+                    endArea = model.endShelf;
+                    // 娌℃湁鍦ㄩ厤缃枃浠舵壘鍒拌繖涓揣鏋跺彿
+                    if (!Settings.AreaMap[AreaName.璐ф灦鍖篯.Contains(endArea)) {
+                        return BuildSimpleResult(2, $"璐ф灦鍙�{model.endShelf} 涓嶅瓨鍦�);
+                    }
+                }
+
+                // 鏃犺鏄惁閫夋嫨缁堢偣璐ф灦锛岄兘绛夊埌绉伴噸涔嬪悗鍐嶈绠楃粓鐐硅揣浣�+                using (var trans = db.Ado.UseTran()) {
+                    if (db.Insertable<TN_Loc_Container>(cntLoc).ExecuteCommand() > 0
+                        && db.Insertable<TN_CG_Detail>(cgCnt).ExecuteCommand() > 0) {
+                        //鍒涘缓浜у搧鍏ュ簱浠诲姟锛氬垱寤烘惉閫佷换鍔★紝璧风偣缁堢偣瀹瑰櫒
+                        if (WCSHelper.CreateTaskWithArea(startLoc.S_CODE, endArea, "浜у搧鍏ュ簱(PDA)", 3, cntID)) {
+                            //濡傛灉鎿嶄綔TN_Location浼氶�鎴愭閿�+                            LocationHelper.LockLoc(startLoc.S_CODE, 2);//璧风偣鍑哄簱閿侊紝
+                            //LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+                            trans.CommitTran();
+
+                            return BuildSimpleResult(0, $"鐢熸垚 浜у搧鍏ュ簱(PDA) 鎴愬姛锛屽鍣ㄥ彿 {cntID} 锛岃捣鐐�{startLoc.S_CODE} 锛岀粓鐐硅揣鏋�{endArea} 锛岀粓鐐硅揣浣嶆湭鎸囧畾");
+                        }
+                        else {
+                            trans.RollbackTran();
+
+                            return BuildSimpleResult(5, $"鐢熸垚 浜у搧鍏ュ簱(PDA) 澶辫触锛屽鍣ㄥ彿 {cntID} 锛岃捣鐐�{startLoc.S_CODE} 锛岀粓鐐硅揣鏋�{endArea} 锛岀粓鐐硅揣浣嶆湭鎸囧畾");
+                        }
+                    }
+                    else {
+                        return BuildSimpleResult(6, $"鎻掑叆琛ㄦ暟鎹け璐�);
+                    }
+                }
+            }
+            catch (Exception ex) {
+                return BuildSimpleResult(1, $"鍙戠敓浜嗗紓甯革細{ex.Message}");
+            }
+        }
+
+        /// <summary>
+        /// PDA閫夋嫨缁堢偣璐т綅
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult SelectLocation(SelectLocationInfo model) {
+            LogHelper.Info("瑙﹀彂API锛歅DA閫夋嫨缁堢偣璐т綅" + JsonConvert.SerializeObject(model), "API");
+            var db = DbHelper.GetDbClient();
+
+            try {
+                // 浠诲姟鍙峰瓨鍦細缁堢偣璐ф灦鍜岀粓鐐逛綅缃负绌猴紝涓斾换鍔′负浜у搧鍏ュ簱(PDA)
+                //var task = db.Queryable<TN_Task>().First(a => a.S_CODE == model.taskNo && a.S_END_AREA == "" && a.S_END_LOC == "" && a.S_TYPE == "浜у搧鍏ュ簱(PDA)");
+                var task = db.Queryable<TN_Task>().First(a => a.S_EQ_NO == model.forklift_no && a.S_END_AREA == "" && a.S_END_LOC == "" && a.S_TYPE == "浜у搧鍏ュ簱(PDA)");
+                
+                if (task == null) {
+                    //return BuildSimpleResult(2, $"浠诲姟鍙�{model.taskNo} 涓嶅瓨鍦紝鎴栦笉婊¤冻缁堢偣璐ф灦涓虹┖銆佺粓鐐逛綅缃负绌轰笖涓�浜у搧鍏ュ簱(PDA) 浠诲姟");
+                    return BuildSimpleResult(2, $"灏忚溅 '{model.forklift_no}' 褰撳墠涓嶅瓨鍦ㄤ换鍔★紝鎴栦笉婊¤冻缁堢偣璐ф灦涓虹┖銆佺粓鐐逛綅缃负绌轰笖涓�浜у搧鍏ュ簱(PDA) 浠诲姟");
+                }
+
+                var endLoc = new TN_Location();
+                if (task.F_WEIGHT > 1500) {
+                    // 閲嶉噺瓒呰繃1.5t锛岄渶瑕侀�鎷�-3灞傝揣鏋�+                    endLoc = db.Queryable<TN_Location>().First(
+                        a => a.S_CODE == model.endLoc && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y" && a.N_CURRENT_NUM == 0 && a.N_HEIGHT <= 3);
+                }
+                else {
+                    endLoc = db.Queryable<TN_Location>().First(
+                        a => a.S_CODE == model.endLoc && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y" && a.N_CURRENT_NUM == 0);
+                }
+
+                // 娌℃湁绗﹀悎鏉′欢鐨勮揣浣�+                if (endLoc == null) {
+                    return BuildSimpleResult(3, $"璐т綅{model.endLoc}涓嶆弧瓒宠姹傦細涓嶅瓨鍦ㄦ垨涓嶆弧瓒崇О閲嶆斁缃姹�);
+                }
+
+                // 淇敼浠诲姟缁堢偣涓篜DA鎸囧畾缁堢偣
+                task.S_END_LOC = endLoc.S_CODE;
+                task.S_END_AREA = endLoc.S_SHELF_CODE;
+
+                using (var trans = db.Ado.UseTran()) {
+                    if (db.Updateable<TN_Task>(task).ExecuteCommand() > 0) {
+                        LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+                        trans.CommitTran();
+
+                        return BuildSimpleResult(0, $"浠诲姟{task.S_CODE}淇敼鎴愬姛锛屼慨鏀圭粓鐐逛綅缃负{endLoc.S_CODE}");
+                    }
+                    else {
+                        trans.RollbackTran();
+
+                        return BuildSimpleResult(4, $"浠诲姟{task.S_CODE}淇敼澶辫触锛屼慨鏀圭粓鐐逛綅缃负{endLoc.S_CODE}");
+                    }
+                }
+            }
+            catch (Exception ex) {
+                return BuildSimpleResult(1, $"鍙戠敓浜嗗紓甯革細{ex.Message}");
+            }
+        }
+
+        /// <summary>
+        /// 浜у搧閮ㄥ垎鍑哄簱(WMS)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult PartOutWarehouse(PartOutWarehouseInfo model) {
+            LogHelper.Info("瑙﹀彂API锛氫骇鍝侀儴鍒嗗嚭搴�WMS)" + JsonConvert.SerializeObject(model), "API");
+            var db = DbHelper.GetDbClient();
+
+            try {
+                // 璧风偣浣嶇疆锛氳揣鏋讹紙鏈夎揣銆佹病鏈夐攣銆佸凡鍚敤锛�+                var startLoc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.startLoc && a.N_CURRENT_NUM == 1 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y");
+
+                if (startLoc == null) {
+                    return BuildSimpleResult(2, $"璧风偣浣嶇疆 {model.startLoc} 涓嶅瓨鍦ㄦ垨涓嶅叿澶囧彇璐ц姹�);
+                }
+
+                var locCtnrRel = db.Queryable<TN_Loc_Container>().First(a => a.S_LOC_CODE == model.startLoc);
+
+                if (locCtnrRel == null) {
+                    return BuildSimpleResult(3, $"璧风偣浣嶇疆 {model.startLoc} 娌℃湁缁戝畾瀹瑰櫒锛屾棤鍙嚭搴撶殑鐗╂枡");
+                }
+
+                var endLoc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.endLoc && a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y" && a.S_AREA_CODE == AreaCode.鏀跺彂璐т綅鍖�;
+
+                if (endLoc == null) {
+                    return BuildSimpleResult(4, $"缁堢偣浣嶇疆 {model.endLoc} 涓嶅叿澶囨斁璐ф潯浠�);
+                }
+
+                using (var trans = db.Ado.UseTran()) {
+                    // 瑙g粦锛氳捣鐐硅揣浣嶄笌寰呮惉杩愬鍣紙涓嶉渶瑕佹墜鍔╠eleteable鎿嶄綔锛屽唴閮ㄤ細鑷姩鎿嶄綔鐨勶級
+                    if (WCSHelper.CreateTask(startLoc.S_CODE, endLoc.S_CODE, "浜у搧閮ㄥ垎鍑哄簱(WMS)", 3, locCtnrRel.S_CNTR_CODE))//鍒涘缓鎼�浠诲姟锛岃捣鐐圭粓鐐瑰鍣�+                        {//濡傛灉鎿嶄綔TN_Location浼氶�鎴愭閿�+                        LocationHelper.LockLoc(startLoc.S_CODE, 2);//璧风偣鍑哄簱閿侊紝
+                        LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+                        trans.CommitTran();
+                        return BuildSimpleResult(0, $"鐢熸垚 浜у搧鍑哄簱(WMS) 鎴愬姛锛屽鍣ㄥ彿{locCtnrRel.S_CNTR_CODE}锛岃捣鐐箋startLoc.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+                    }
+                    else {
+                        trans.RollbackTran();
+                        return BuildSimpleResult(5, $"鐢熸垚 浜у搧鍑哄簱(WMS) 澶辫触锛屽鍣ㄥ彿{locCtnrRel.S_CNTR_CODE}锛岃捣鐐箋startLoc.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+                    }
+                }
+            }
+            catch (Exception ex) {
+                return BuildSimpleResult(1, $"鍙戠敓浜嗗紓甯革細{ex.Message}");
+            }
+        }
+
+        /// <summary>
+        /// 浜у搧閮ㄥ垎鍥炲簱(WMS)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult PartInWarehouse(PartInWarehouseInfo model) {
+            LogHelper.Info("瑙﹀彂API锛氫骇鍝侀儴鍒嗗洖搴�WMS)" + JsonConvert.SerializeObject(model), "API");
+            var db = DbHelper.GetDbClient();
+
+            try {
+                // 璧风偣浣嶇疆锛氬彇鏀捐揣鍖猴紙鏈夎揣鐗┿�娌℃湁閿併�宸插惎鐢級
+                var startLoc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.startLoc && a.N_CURRENT_NUM == 1 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y" && a.S_AREA_CODE == AreaCode.鏀跺彂璐т綅鍖�;
+                if (startLoc == null) {
+                    return BuildSimpleResult(2, $"璧风偣浣嶇疆 {model.startLoc} 涓嶇鍚堝洖搴撴潯浠�);
+                }
+
+                var locCtnrRel = db.Queryable<TN_Loc_Container>().First(a => a.S_LOC_CODE == model.startLoc);
+                if (locCtnrRel == null) {
+                    return BuildSimpleResult(3, $"璧风偣浣嶇疆 {model.startLoc} 娌℃湁缁戝畾瀹瑰櫒锛屾棤鍙洖搴撶殑鐗╂枡");
+                }
+
+                // 缁堢偣浣嶇疆锛氳揣鏋讹紙娌℃湁璐х墿锛屾病鏈夐攣锛�+                var endLoc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.endLoc && a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y");
+                if (endLoc == null) {
+                    return BuildSimpleResult(4, $"缁堢偣浣嶇疆 {model.endLoc} 涓嶅叿澶囨斁璐ф潯浠�);
+                }
+
+                using (var trans = db.Ado.UseTran()) {
+                    // 瑙g粦锛氳捣鐐硅揣浣嶄笌寰呮惉杩愬鍣紙涓嶉渶瑕佹墜鍔╠eleteable鎿嶄綔锛屽唴閮ㄤ細鑷姩鎿嶄綔鐨勶級
+                    if (WCSHelper.CreateTask(startLoc.S_CODE, endLoc.S_CODE, "浜у搧閮ㄥ垎鍏ュ簱(WMS)", 3, locCtnrRel.S_CNTR_CODE))//鍒涘缓鎼�浠诲姟锛岃捣鐐圭粓鐐瑰鍣�+                        {//濡傛灉鎿嶄綔TN_Location浼氶�鎴愭閿�+                        LocationHelper.LockLoc(startLoc.S_CODE, 2);//璧风偣鍑哄簱閿侊紝
+                        LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+                        trans.CommitTran();
+                        return BuildSimpleResult(0, $"鐢熸垚 浜у搧閮ㄥ垎鍥炲簱(WMS) 鎴愬姛锛屽鍣ㄥ彿{locCtnrRel.S_CNTR_CODE}锛岃捣鐐箋startLoc.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+                    }
+                    else {
+                        trans.RollbackTran();
+                        return BuildSimpleResult(5, $"鐢熸垚 浜у搧閮ㄥ垎鍥炲簱(WMS) 鎴愬姛锛屽鍣ㄥ彿{locCtnrRel.S_CNTR_CODE}锛岃捣鐐箋startLoc.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+                    }
+                }
+            }
+            catch (Exception ex) {
+                return BuildSimpleResult(1, $"鍙戠敓浜嗗紓甯革細{ex.Message}");
+            }
+        }
+
+        /// <summary>
+        /// 鐩樼偣鐞嗚揣鍑哄簱(WMS)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult CheckOutWarehouse(CheckOutWarehouseInfo model) {
+            LogHelper.Info("瑙﹀彂API锛氱洏鐐圭悊璐у嚭搴�WMS)" + JsonConvert.SerializeObject(model), "API");
+            var db = DbHelper.GetDbClient();
+
+            try {
+                // 璧风偣浣嶇疆锛氬彇鏀捐揣鍖猴紙鏈夎揣鐗┿�娌℃湁閿併�宸插惎鐢級
+                var startLoc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.startLoc && a.N_CURRENT_NUM == 1 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y" && a.S_AREA_CODE == AreaCode.鏀跺彂璐т綅鍖�;
+                if (startLoc == null) {
+                    return BuildSimpleResult(2, $"璧风偣浣嶇疆 {model.startLoc} 涓嶇鍚堝嚭搴撴潯浠�);
+                }
+
+                var locCtnrRel = db.Queryable<TN_Loc_Container>().First(a => a.S_LOC_CODE == model.startLoc);
+                if (locCtnrRel == null) {
+                    return BuildSimpleResult(3, $"璧风偣浣嶇疆 {model.startLoc} 娌℃湁缁戝畾瀹瑰櫒锛屾棤鍙洖搴撶殑鐗╂枡");
+                }
+
+                // 缁堢偣浣嶇疆锛氳揣鏋讹紙娌℃湁璐х墿锛屾病鏈夐攣锛�+                var endLoc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.endLoc && a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y");
+                if (endLoc == null) {
+                    return BuildSimpleResult(4, $"缁堢偣浣嶇疆 {model.endLoc} 涓嶅叿澶囨斁璐ф潯浠�);
+                }
+
+                using (var trans = db.Ado.UseTran()) {
+                    // 瑙g粦锛氳捣鐐硅揣浣嶄笌寰呮惉杩愬鍣紙涓嶉渶瑕佹墜鍔╠eleteable鎿嶄綔锛屽唴閮ㄤ細鑷姩鎿嶄綔鐨勶級
+                    if (WCSHelper.CreateTask(startLoc.S_CODE, endLoc.S_CODE, "鐩樼偣鐞嗚揣鍑哄簱(WMS)", 3, locCtnrRel.S_CNTR_CODE))//鍒涘缓鎼�浠诲姟锛岃捣鐐圭粓鐐瑰鍣�+                        {//濡傛灉鎿嶄綔TN_Location浼氶�鎴愭閿�+                        LocationHelper.LockLoc(startLoc.S_CODE, 2);//璧风偣鍑哄簱閿侊紝
+                        LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+                        trans.CommitTran();
+                        return BuildSimpleResult(0, $"鐢熸垚 鐩樼偣鐞嗚揣鍑哄簱(WMS) 鎴愬姛锛屽鍣ㄥ彿{locCtnrRel.S_CNTR_CODE}锛岃捣鐐箋startLoc.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+                    }
+                    else {
+                        trans.RollbackTran();
+                        return BuildSimpleResult(5, $"鐢熸垚 鐩樼偣鐞嗚揣鍑哄簱(WMS) 鎴愬姛锛屽鍣ㄥ彿{locCtnrRel.S_CNTR_CODE}锛岃捣鐐箋startLoc.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+                    }
+                }
+            }
+            catch (Exception ex) {
+                return BuildSimpleResult(1, $"鍙戠敓浜嗗紓甯革細{ex.Message}");
+            }
+        }
+
+        /// <summary>
+        /// 鐩樼偣鐞嗚揣鍥炲簱(WMS)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult CheckInWarehouse(CheckInWarehouseInfo model) {
+            LogHelper.Info("瑙﹀彂API锛氱洏鐐圭悊璐у洖搴�WMS)" + JsonConvert.SerializeObject(model), "API");
+            var db = DbHelper.GetDbClient();
+
+            try {
+                // 璧风偣浣嶇疆锛氬彇鏀捐揣鍖猴紙鏈夎揣鐗┿�娌℃湁閿併�宸插惎鐢級
+                var startLoc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.startLoc && a.N_CURRENT_NUM == 1 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y" && a.S_AREA_CODE == AreaCode.鏀跺彂璐т綅鍖�;
+                if (startLoc == null) {
+                    return BuildSimpleResult(2, $"璧风偣浣嶇疆 {model.startLoc} 涓嶇鍚堝洖搴撴潯浠�);
+                }
+
+                var locCtnrRel = db.Queryable<TN_Loc_Container>().First(a => a.S_LOC_CODE == model.startLoc);
+                if (locCtnrRel == null) {
+                    return BuildSimpleResult(3, $"璧风偣浣嶇疆 {model.startLoc} 娌℃湁缁戝畾瀹瑰櫒锛屾棤鍙洖搴撶殑鐗╂枡");
+                }
+
+                // 缁堢偣浣嶇疆锛氳揣鏋讹紙娌℃湁璐х墿锛屾病鏈夐攣锛�+                var endLoc = db.Queryable<TN_Location>().First(a => a.S_CODE == model.endLoc && a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.C_ENABLE == "Y");
+                if (endLoc == null) {
+                    return BuildSimpleResult(4, $"缁堢偣浣嶇疆 {model.endLoc} 涓嶅叿澶囨斁璐ф潯浠�);
+                }
+
+                using (var trans = db.Ado.UseTran()) {
+                    // 瑙g粦锛氳捣鐐硅揣浣嶄笌寰呮惉杩愬鍣紙涓嶉渶瑕佹墜鍔╠eleteable鎿嶄綔锛屽唴閮ㄤ細鑷姩鎿嶄綔鐨勶級
+                    if (WCSHelper.CreateTask(startLoc.S_CODE, endLoc.S_CODE, "鐩樼偣鐞嗚揣鍥炲簱(WMS)", 3, locCtnrRel.S_CNTR_CODE))//鍒涘缓鎼�浠诲姟锛岃捣鐐圭粓鐐瑰鍣�+                        {//濡傛灉鎿嶄綔TN_Location浼氶�鎴愭閿�+                        LocationHelper.LockLoc(startLoc.S_CODE, 2);//璧风偣鍑哄簱閿侊紝
+                        LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�+
+                        trans.CommitTran();
+                        return BuildSimpleResult(0, $"鐢熸垚 鐩樼偣鐞嗚揣鍥炲簱(WMS) 鎴愬姛锛屽鍣ㄥ彿{locCtnrRel.S_CNTR_CODE}锛岃捣鐐箋startLoc.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+                    }
+                    else {
+                        trans.RollbackTran();
+                        return BuildSimpleResult(5, $"鐢熸垚 鐩樼偣鐞嗚揣鍥炲簱(WMS) 鎴愬姛锛屽鍣ㄥ彿{locCtnrRel.S_CNTR_CODE}锛岃捣鐐箋startLoc.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
+                    }
+                }
+            }
+            catch (Exception ex) {
+                return BuildSimpleResult(1, $"鍙戠敓浜嗗紓甯革細{ex.Message}");
+            }
+        }
+
+        /// <summary>
+        /// 鍏ュ簱鏁版嵁鍚屾(ERP)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult InWarehouseDataSync(InWarehouseDataSyncInfo model) {
+            return BuildSimpleResult(0, "");
+        }
+
+        /// <summary>
+        /// 鍑哄簱鍙戞枡鍚屾(ERP)
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        internal static SimpleResult OutWarehouseDataSync(OutWarehouseDataSyncInfo model) {
+            return BuildSimpleResult(0, "");
+        }
+    }
+}
diff --git a/config/config.json b/config/config.json
new file mode 100644
index 0000000..9f8baed
--- /dev/null
+++ b/config/config.json
@@ -0,0 +1,18 @@
+{
+    "WebApiUrl": "http://127.0.0.1:8901/",
+    "RCSApiUrl": "http://127.0.0.1:6001",
+    "NDCApiUrl": "http://127.0.0.1:5201/api/order/",
+    "SqlServer": "Data Source=(local);Initial Catalog=AnGangTest;User ID=sa;Password=123456;",
+    "TCPServerIP": "127.0.0.1",
+    "TCPServerPort": 8085,
+    "Areas": [
+        {
+            "Name": "鏀跺彂璐т綅鍖�,
+            "Codes": [ "P" ]
+        },
+        {
+            "Name": "璐ф灦鍖�,
+            "Codes": [ "B111", "B112", "B113", "B114", "B115", "B116", "B117", "B118" ]
+        }
+    ]
+}
\ No newline at end of file
diff --git a/packages.config b/packages.config
new file mode 100644
index 0000000..17b206b
--- /dev/null
+++ b/packages.config
@@ -0,0 +1,53 @@
+锘�?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="BouncyCastle.Cryptography" version="2.4.0" targetFramework="net462" />
+  <package id="EasyModbusTCP" version="5.6.0" targetFramework="net461" />
+  <package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
+  <package id="Microsoft.AspNet.WebApi.Core" version="5.3.0" targetFramework="net462" />
+  <package id="Microsoft.AspNet.WebApi.Owin" version="5.3.0" targetFramework="net462" />
+  <package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.3.0" targetFramework="net462" />
+  <package id="Microsoft.AspNet.WebApi.WebHost" version="5.3.0" targetFramework="net462" />
+  <package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net48" />
+  <package id="Microsoft.Bcl.HashCode" version="1.1.1" targetFramework="net462" />
+  <package id="Microsoft.Extensions.Logging.Abstractions" version="3.1.32" targetFramework="net462" />
+  <package id="Microsoft.Owin" version="4.2.2" targetFramework="net461" />
+  <package id="Microsoft.Owin.Host.HttpListener" version="4.2.2" targetFramework="net461" />
+  <package id="Microsoft.Owin.Hosting" version="4.2.2" targetFramework="net461" />
+  <package id="Microsoft.Web.Infrastructure" version="2.0.0" targetFramework="net462" />
+  <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
+  <package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" />
+  <package id="NLog" version="5.3.4" targetFramework="net462" />
+  <package id="OPCFoundation.NetStandard.Opc.Ua" version="1.5.374.126" targetFramework="net462" />
+  <package id="OPCFoundation.NetStandard.Opc.Ua.Client" version="1.5.374.126" targetFramework="net462" />
+  <package id="OPCFoundation.NetStandard.Opc.Ua.Configuration" version="1.5.374.126" targetFramework="net462" />
+  <package id="OPCFoundation.NetStandard.Opc.Ua.Core" version="1.5.374.126" targetFramework="net462" />
+  <package id="OPCFoundation.NetStandard.Opc.Ua.Gds.Client.Common" version="1.5.374.126" targetFramework="net462" />
+  <package id="OPCFoundation.NetStandard.Opc.Ua.Gds.Server.Common" version="1.5.374.126" targetFramework="net462" />
+  <package id="OPCFoundation.NetStandard.Opc.Ua.Security.Certificates" version="1.5.374.126" targetFramework="net462" />
+  <package id="OPCFoundation.NetStandard.Opc.Ua.Server" version="1.5.374.126" targetFramework="net462" />
+  <package id="Owin" version="1.0" targetFramework="net461" />
+  <package id="Portable.BouncyCastle" version="1.9.0" targetFramework="net462" />
+  <package id="S7netplus" version="0.20.0" targetFramework="net461" requireReinstallation="true" />
+  <package id="SqlSugar" version="5.1.4.169" targetFramework="net462" />
+  <package id="Swashbuckle" version="5.6.0" targetFramework="net461" />
+  <package id="Swashbuckle.Core" version="5.6.0" targetFramework="net461" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net461" />
+  <package id="System.Diagnostics.DiagnosticSource" version="6.0.1" targetFramework="net462" />
+  <package id="System.Formats.Asn1" version="8.0.1" targetFramework="net462" />
+  <package id="System.Memory" version="4.5.5" targetFramework="net461" />
+  <package id="System.Net.Http" version="4.3.4" targetFramework="net462" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net461" />
+  <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net452" />
+  <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" />
+  <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" />
+  <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" />
+  <package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net462" />
+  <package id="System.ServiceModel.Primitives" version="4.10.0" targetFramework="net462" />
+  <package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net48" />
+  <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net461" />
+  <package id="System.ValueTuple" version="4.5.0" targetFramework="net48" requireReinstallation="true" />
+  <package id="Topshelf" version="4.3.0" targetFramework="net452" />
+  <package id="Topshelf.NLog" version="4.3.0" targetFramework="net452" />
+  <package id="WebActivatorEx" version="2.2.0" targetFramework="net462" />
+</packages>
\ No newline at end of file
diff --git a/swagger.js b/swagger.js
new file mode 100644
index 0000000..aed0f8c
--- /dev/null
+++ b/swagger.js
@@ -0,0 +1,110 @@
+'use strict';
+window.SwaggerTranslator = {
+    _words: [],
+
+    translate: function ()
+    {
+        var $this = this;
+        $('[data-sw-translate]').each(function ()
+        {
+            $(this).html($this._tryTranslate($(this).html()));
+            $(this).val($this._tryTranslate($(this).val()));
+            $(this).attr('title', $this._tryTranslate($(this).attr('title')));
+        });
+    },
+
+    setControllerSummary: function ()
+    {
+        $.ajax({
+            type: "get",
+            async: true,
+            url: $("#input_baseUrl").val(),
+            dataType: "json",
+            success: function (data)
+            {
+                var summaryDict = data.ControllerDesc;
+                var id, controllerName, strSummary;
+                $("#resources_container .resource").each(function (i, item)
+                {
+                    id = $(item).attr("id");
+                    if (id)
+                    {
+                        controllerName = id.substring(9);
+                        strSummary = summaryDict[controllerName];
+                        if (strSummary)
+                        {
+                            $(item).children(".heading").children(".options").first().prepend('<li class="controller-summary" title="' + strSummary + '">' + strSummary + '</li>');
+                        }
+                    }
+                });
+            }
+        });
+    },
+    _tryTranslate: function (word)
+    {
+        return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word;
+    },
+
+    learn: function (wordsMap)
+    {
+        this._words = wordsMap;
+    }
+};
+
+
+/* jshint quotmark: float */
+window.SwaggerTranslator.learn({
+    "Warning: Deprecated": "警告:已过时",
+    "Implementation Notes": "实现备注",
+    "Response Class": "响应类",
+    "Status": "状态",
+    "Parameters": "参数",
+    "Parameter": "参数",
+    "Value": "值",
+    "Description": "描述",
+    "Parameter Type": "参数类型",
+    "Data Type": "数据类型",
+    "Response Messages": "响应消息",
+    "HTTP Status Code": "HTTP 状态码",
+    "Reason": "原因",
+    "Response Model": "响应模型",
+    "Request URL": "请求 URL",
+    "Response Body": "响应体",
+    "Response Code": "响应码",
+    "Response Headers": "响应头",
+    "Hide Response": "隐藏响应",
+    "Headers": "头",
+    "Try it out!": "试一下!",
+    "Show/Hide": "显示/隐藏",
+    "List Operations": "显示操作",
+    "Expand Operations": "展开操作",
+    "Raw": "原始",
+    "can't parse JSON.  Raw result": "无法解析 JSON。原始结果",
+    "Model Schema": "模型架构",
+    "Model": "模型",
+    "apply": "应用",
+    "Username": "用户名",
+    "Password": "密码",
+    "Terms of service": "服务条款",
+    "Created by": "创建者",
+    "See more at": "查看更多:",
+    "Contact the developer": "联系开发者",
+    "api version": "api 版本",
+    "Response Content Type": "响应 Content Type",
+    "fetching resource": "正在获取资源",
+    "fetching resource list": "正在获取资源列表",
+    "Explore": "浏览",
+    "Show Swagger Petstore Example Apis": "显示 Swagger Petstore 示例 Apis",
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.": "无法从服务器读取。可能没有正确设置 access-control-origin。",
+    "Please specify the protocol for": "请指定协议:",
+    "Can't read swagger JSON from": "无法读取 swagger JSON于",
+    "Finished Loading Resource Information. Rendering Swagger UI": "已加载资源信息。正在渲染 Swagger UI",
+    "Unable to read api": "无法读取 api",
+    "from path": "从路径",
+    "server returned": "服务器返回"
+});
+$(function ()
+{
+    window.SwaggerTranslator.translate();
+    window.SwaggerTranslator.setControllerSummary();
+});
\ No newline at end of file

--
Gitblit v1.9.1