From a8be8f9371b6fc03b66d212b2902d08f93b087dd Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期三, 02 七月 2025 13:55:55 +0800 Subject: [PATCH] 新增任务查询方法并优化逻辑在 `ITaskService.cs` 中添加了新的 `QueryExecutingConveyorLineTask` 方法,支持根据托盘号和下一地址查询任务,同时调整了原有方法的参数以保留旧功能。在 `TaskService.cs` 中新增重载方法,允许根据下一地址和条形码查询任务。在 `CommonConveyorLine_GWJob.cs` 中更新了 `ConveyorLineOutFinish` 方法,简化了任务查询逻辑并删除了多余的注释代码。同时,增加了对 `taskNext` 的处理逻辑,确保在任务未找到时的相应处理,并更新在途数据的逻辑,提升数据一致性和准确性。 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/dt_needBarcode.cs | 49 +++++++++++++++++++++++++++---------------------- 1 files changed, 27 insertions(+), 22 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/dt_needBarcode.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/dt_needBarcode.cs index 6de828c..970c257 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/dt_needBarcode.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/dt_needBarcode.cs @@ -1,4 +1,5 @@ -锘縰sing SqlSugar; +锘縰sing Magicodes.ExporterAndImporter.Core; +using SqlSugar; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; @@ -8,65 +9,69 @@ namespace WIDESEAWCS_Model.Models { + [SugarTable(nameof(dt_needBarcode), "鍦ㄩ�旀暟鎹�")] + public class dt_needBarcode : BaseEntity { [Key] - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] + [ImporterHeader(IsIgnore = true)] + [ExporterHeader(DisplayName = "涓婚敭")] + [SugarColumn(IsIdentity = true, IsNullable = true, IsPrimaryKey = true, ColumnDescription = "涓婚敭")] public int id { get; set; } /// <summary> /// 鐩爣搴撳尯 /// </summary> - [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鐩爣搴撳尯")] + [ImporterHeader(Name = "鐩爣搴撳尯")] + [ExporterHeader(DisplayName = "鐩爣搴撳尯")] + [SugarColumn(IsNullable = true, ColumnDescription = "鐩爣搴撳尯")] public string toArea { get; set; } /// <summary> /// 鏉ユ簮搴撳尯 /// </summary> - [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "鏉ユ簮搴撳尯")] + [ImporterHeader(Name = "鏉ユ簮搴撳尯")] + [ExporterHeader(DisplayName = "鏉ユ簮搴撳尯")] + [SugarColumn(IsNullable = true, ColumnDescription = "鏉ユ簮搴撳尯")] public string fromArea { get; set; } /// <summary> /// 鎵樼洏绫诲瀷 /// </summary> - [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "鎵樼洏绫诲瀷")] + [ImporterHeader(Name = "鎵樼洏绫诲瀷")] + [ExporterHeader(DisplayName = "鎵樼洏绫诲瀷")] + [SugarColumn(IsNullable = true, ColumnDescription = "鎵樼洏绫诲瀷")] public string barcodeType { get; set; } /// <summary> /// 浜х嚎 /// </summary> - [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "鎵�灞炰骇绾�")] + [ImporterHeader(Name = "浜х嚎")] + [ExporterHeader(DisplayName = "浜х嚎")] + [SugarColumn(IsNullable = true, ColumnDescription = "浜х嚎")] public string productLine { get; set; } /// <summary> /// 鍦ㄩ�旀暟閲� /// </summary> - [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "鍦ㄩ�旀暟閲�")] + [ImporterHeader(Name = "鍦ㄩ�旀暟閲�")] + [ExporterHeader(DisplayName = "鍦ㄩ�旀暟閲�")] + [SugarColumn(IsNullable = true, ColumnDescription = "鍦ㄩ�旀暟閲�")] public int inLineNum { get; set; } /// <summary> /// 鐩爣缂撳瓨鏁伴噺 /// </summary> - [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "鍙紦瀛樻暟閲�")] + [ImporterHeader(Name = "鍙紦瀛樻暟閲�")] + [ExporterHeader(DisplayName = "鍙紦瀛樻暟閲�")] + [SugarColumn(IsNullable = true, ColumnDescription = "鍙紦瀛樻暟閲�")] public int cacheNum { get; set; } = 0; /// <summary> /// 宸插垱寤哄嚭搴撲换鍔℃暟閲� /// </summary> - [NotMapped] - public int haveOutNum { get; set; } = 0; - - /// <summary> - /// 鍙叆鏁伴噺 - /// </summary> - [NotMapped] - public int canInNum { get; set; } = 0; - - /// <summary> - /// 宸插垱寤哄嚭搴撲换鍔� - /// </summary> - [NotMapped] - public List<Dt_Task> haveOutList { get; set; } + //[NotMapped] + //public int haveOutNum { get; set; } = 0; } } -- Gitblit v1.9.3