From 1935fd1b234adbe582ee54172dd3d8b01e5b4b4c Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期三, 05 六月 2024 09:22:39 +0800 Subject: [PATCH] 优化AGV和桁架防呆逻辑,优化空托出库逻辑 --- 代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/Gantry/QueryData.cs | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/Gantry/QueryData.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/Gantry/QueryData.cs" index 7a0c321..7e576c3 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/Gantry/QueryData.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/Gantry/QueryData.cs" @@ -3,8 +3,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_Core.EFDbContext; using WIDESEA_Core.FreeDB; using WIDESEA_Entity.DomainModels; +using WIDESEA_WMS.IRepositories; +using WIDESEA_WMS.Repositories; namespace WIDESEA_WMS.Common { @@ -12,13 +15,34 @@ { static FreeDB freeDB = new FreeDB(); /// <summary> - /// 鏌ヨ鐗╂枡淇℃伅 + /// 鏍规嵁鍥惧彿鏌ヨ杞﹁疆淇℃伅 /// </summary> /// <param name="type"></param> /// <returns></returns> public static dt_geometry_data QueryMateriel(string type) { - var materielinfo = freeDB.Select<dt_geometry_data>().Where(x => x.TypeId.ToString() == type).First(); + VOLContext Context = new VOLContext(); + Idt_geometry_dataRepository dataRepository = new dt_geometry_dataRepository(Context); + var materielinfo = dataRepository.Find(x => x.Description == type).OrderBy(x => x.TypeId).FirstOrDefault(); + //var materielinfo = freeDB.Select<dt_geometry_data>().Where(x => x.Description == type).First(); + return materielinfo; + } + public static dt_geometry_data_detectionline QueryMateriel1(string type) + { + VOLContext Context = new VOLContext(); + Idt_geometry_data_detectionlineRepository data_DetectionlineRepository = new dt_geometry_data_detectionlineRepository(Context); + //var materielinfo = freeDB.Select<dt_geometry_data_detectionline>().Where(x => x.Description == type).First(); + var materielinfo = data_DetectionlineRepository.Find(x => x.Description == type).OrderBy(x => x.TypeId).FirstOrDefault(); + return materielinfo; + } + /// <summary> + /// 鏍规嵁涓婚敭鏌ヨ杞﹁疆淇℃伅 + /// </summary> + /// <param name="type"></param> + /// <returns></returns> + public static dt_geometry_data QueryMateriel(int type) + { + var materielinfo = freeDB.Select<dt_geometry_data>().Where(x => x.TypeId == type).First(); return materielinfo; } } -- Gitblit v1.9.3