From e93d2a1c8fdfadf50f9fbf9e30c04ffe73df023a Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期三, 14 八月 2024 16:26:03 +0800 Subject: [PATCH] 11 --- MES.Service/Modes/MesDepotSections.cs | 134 ++++++++++++++++++++++++-------------------- MES.Service/service/Warehouse/OpeningReceiptServer.cs | 1 MES.Service/service/Warehouse/MesDepotSectionsManager.cs | 39 ++++++++++++ 3 files changed, 111 insertions(+), 63 deletions(-) diff --git a/MES.Service/Modes/MesDepotSections.cs b/MES.Service/Modes/MesDepotSections.cs index 7011883..5cb98ee 100644 --- a/MES.Service/Modes/MesDepotSections.cs +++ b/MES.Service/Modes/MesDepotSections.cs @@ -8,96 +8,108 @@ [SugarTable("MES_DEPOT_SECTIONS")] public class MesDepotSections { - /// <summary> - /// ID(SEQ_INV_ID)锛圗RPID锛� - /// </summary> - [SugarColumn(ColumnName = "DEPOT_SECTION_ID", IsPrimaryKey = true)] + /// <summary> + /// ID(SEQ_INV_ID)锛圗RPID锛� + /// </summary> + [SugarColumn(ColumnName = "DEPOT_SECTION_ID", IsPrimaryKey = true)] public decimal DepotSectionId { get; set; } - /// <summary> - /// 璐т綅缂栫爜 - /// </summary> - [SugarColumn(ColumnName = "DEPOT_SECTION_CODE")] + /// <summary> + /// 璐т綅缂栫爜 + /// </summary> + [SugarColumn(ColumnName = "DEPOT_SECTION_CODE")] public string DepotSectionCode { get; set; } - /// <summary> - /// 璐т綅鍚嶇О - /// </summary> - [SugarColumn(ColumnName = "DEPOT_SECTION_NAME")] + /// <summary> + /// 璐т綅鍚嶇О + /// </summary> + [SugarColumn(ColumnName = "DEPOT_SECTION_NAME")] public string DepotSectionName { get; set; } - /// <summary> - /// 浠撳簱缂栫爜 - /// </summary> - [SugarColumn(ColumnName = "DEPOT_ID")] + /// <summary> + /// 浠撳簱缂栫爜 + /// </summary> + [SugarColumn(ColumnName = "DEPOT_ID")] public decimal? DepotId { get; set; } - /// <summary> - /// 鍙備笌榻愬鏍¢獙(0:鍚�,1:鏄�) - /// </summary> - [SugarColumn(ColumnName = "COMPLETENESS_FLAG")] + /// <summary> + /// 鍙備笌榻愬鏍¢獙(0:鍚�,1:鏄�) + /// </summary> + [SugarColumn(ColumnName = "COMPLETENESS_FLAG")] public short? CompletenessFlag { get; set; } - /// <summary> - /// 澶囨敞 - /// </summary> - [SugarColumn(ColumnName = "DESCRIPTION")] + /// <summary> + /// 澶囨敞 + /// </summary> + [SugarColumn(ColumnName = "DESCRIPTION")] public string Description { get; set; } - /// <summary> - /// 鍒涘缓浜� - /// </summary> - [SugarColumn(ColumnName = "CREATE_BY")] + /// <summary> + /// 鍒涘缓浜� + /// </summary> + [SugarColumn(ColumnName = "CREATE_BY")] public string CreateBy { get; set; } - /// <summary> - /// 鍒涘缓鏃堕棿 - /// </summary> - [SugarColumn(ColumnName = "CREATE_DATE")] + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + [SugarColumn(ColumnName = "CREATE_DATE")] public DateTime? CreateDate { get; set; } - /// <summary> - /// 鏈�鍚庢洿鏂颁汉 - /// </summary> - [SugarColumn(ColumnName = "LASTUPDATE_BY")] + /// <summary> + /// 鏈�鍚庢洿鏂颁汉 + /// </summary> + [SugarColumn(ColumnName = "LASTUPDATE_BY")] public string LastupdateBy { get; set; } - /// <summary> - /// 鏈�鍚庢洿鏂版椂闂� - /// </summary> - [SugarColumn(ColumnName = "LASTUPDATE_DATE")] + /// <summary> + /// 鏈�鍚庢洿鏂版椂闂� + /// </summary> + [SugarColumn(ColumnName = "LASTUPDATE_DATE")] public DateTime? LastupdateDate { get; set; } - /// <summary> - /// </summary> - [SugarColumn(ColumnName = "COMPANY")] + /// <summary> + /// </summary> + [SugarColumn(ColumnName = "COMPANY")] public string Company { get; set; } - /// <summary> - /// </summary> - [SugarColumn(ColumnName = "FACTORY")] + /// <summary> + /// </summary> + [SugarColumn(ColumnName = "FACTORY")] public string Factory { get; set; } - /// <summary> - /// 鍗℃澘鏁� - /// </summary> - [SugarColumn(ColumnName = "KB_QTY")] + /// <summary> + /// 鍗℃澘鏁� + /// </summary> + [SugarColumn(ColumnName = "KB_QTY")] public decimal? KbQty { get; set; } - /// <summary> - /// 浠撲綅缁処D - /// </summary> - [SugarColumn(ColumnName = "ZUID")] + /// <summary> + /// 浠撲綅缁処D + /// </summary> + [SugarColumn(ColumnName = "ZUID")] public decimal? Zuid { get; set; } - /// <summary> - /// 浠撲綅鍏ㄥ悕 - /// </summary> - [SugarColumn(ColumnName = "DEPOT_SECTION_NAMET")] + /// <summary> + /// 浠撲綅鍏ㄥ悕 + /// </summary> + [SugarColumn(ColumnName = "DEPOT_SECTION_NAMET")] public string DepotSectionNamet { get; set; } - /// <summary> - /// </summary> - [SugarColumn(ColumnName = "ERPID")] + /// <summary> + /// </summary> + [SugarColumn(ColumnName = "ERPID")] public decimal? Erpid { get; set; } + + /// <summary> + /// 浠撳簱绫诲埆缂栫爜 + /// </summary> + [SugarColumn(IsIgnore = true)] + public string? DepotCode { get; set; } + + /// <summary> + /// 浠撳簱绫诲埆鍚嶇О + /// </summary> + [SugarColumn(IsIgnore = true)] + public string? DepotName { get; set; } } \ No newline at end of file diff --git a/MES.Service/service/Warehouse/MesDepotSectionsManager.cs b/MES.Service/service/Warehouse/MesDepotSectionsManager.cs index 5803893..3a02a02 100644 --- a/MES.Service/service/Warehouse/MesDepotSectionsManager.cs +++ b/MES.Service/service/Warehouse/MesDepotSectionsManager.cs @@ -8,7 +8,7 @@ public class MesDepotSectionsManager : Repository<MesDepotSections> { //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉� - + public string GetSectionName(WarehouseQuery query) { var sectionName = Db.Queryable<MesDepotSections, MesDepots>((a, b) => @@ -23,4 +23,41 @@ return sectionName; } + + public MesDepotSections ScanInDepotSectionsName(WarehouseQuery query) + { + + if (string.IsNullOrEmpty(query.sectionCode)) + { + throw new Exception("璇锋壂搴撲綅鏉$爜!"); + } + + var mesDepotSections = Db.Queryable<MesDepotSections, MesDepots>( + (a, b) => + new JoinQueryInfos(JoinType.Inner, a.DepotId == b.DepotId)) + .Where((a, b) => a.DepotSectionCode == query.sectionCode) + .Select((a, b) => new MesDepotSections + { + DepotSectionName = a.DepotSectionName, + DepotCode = b.DepotCode, + DepotName = b.DepotName + }).First(); + + if (mesDepotSections == null) + { + throw new Exception("搴撲綅缂栫爜" + query.sectionCode + " 涓嶅瓨鍦紝璇风‘璁�!"); + } + + return mesDepotSections; + } + + public MesInvItemStocks ScanEditBarcode(WarehouseQuery entity) + { + if (string.IsNullOrEmpty(entity.sectionCode)) + { + throw new Exception("璇锋壂搴撲綅鏉$爜!"); + } + + return null; + } } \ No newline at end of file diff --git a/MES.Service/service/Warehouse/OpeningReceiptServer.cs b/MES.Service/service/Warehouse/OpeningReceiptServer.cs index c4d73b7..74dc31e 100644 --- a/MES.Service/service/Warehouse/OpeningReceiptServer.cs +++ b/MES.Service/service/Warehouse/OpeningReceiptServer.cs @@ -1,7 +1,6 @@ 锘縰sing MES.Service.DB; using MES.Service.Dto.service; using MES.Service.Modes; -using MES.Service.util; using SqlSugar; namespace MES.Service.service.Warehouse; -- Gitblit v1.9.3