From f16f89e86ae47c4470b49067d50d8822c81c589e Mon Sep 17 00:00:00 2001 From: zhoukeda <1315948824@qq.com> Date: Tue, 7 Nov 2023 17:28:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B3=A8=E5=A1=91=E6=BB=A1?= =?UTF-8?q?=E7=AE=B1=E5=88=B0=E4=BD=8D=E5=90=8E=E5=85=A5=E5=BA=93=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=8E=A5=E5=8F=A3=20=E9=A2=86=E6=96=99=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=B7=A5=E4=BD=8D=E5=88=B7=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Consts/CodeTemplateConst.cs | 5 +++++ .../Dto/PrdManage/InstockInput.cs | 1 + ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs | 2 ++ ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs | 12 +++++++++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/BasicData/Tnb.BasicData.Entities/Consts/CodeTemplateConst.cs b/BasicData/Tnb.BasicData.Entities/Consts/CodeTemplateConst.cs index 171f491c..eedf0c86 100644 --- a/BasicData/Tnb.BasicData.Entities/Consts/CodeTemplateConst.cs +++ b/BasicData/Tnb.BasicData.Entities/Consts/CodeTemplateConst.cs @@ -29,6 +29,11 @@ namespace Tnb.BasicData /// 生产齐套领料 /// public const string PRDKITTINGOUTSTOCK_CODE = "PrdKittingOutStocK"; + + /// + /// 生产领料 + /// + public const string PRDOUTSTOCK_CODE = "PrdOutstock"; /// /// 设备维修单 diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/InstockInput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/InstockInput.cs index c7413345..66479a8a 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/InstockInput.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/InstockInput.cs @@ -3,6 +3,7 @@ namespace Tnb.ProductionMgr.Entities.Dto public class InstockInput { public string equip_code { get; set; } + public string label_code { get; set; } public string as_location_code { get; set; } } } \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs index 054301b6..08625689 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs @@ -530,6 +530,7 @@ namespace Tnb.ProductionMgr var queryable1 = db.Queryable() .LeftJoin((a, b) => a.create_id == b.Id) + .Where((a,b)=>a.workstation_id==input.stationId) .Select((a, b) => new FeedingRecordListOutput() { id = a.id, @@ -543,6 +544,7 @@ namespace Tnb.ProductionMgr var queryable2 = db.Queryable() .LeftJoin((a, b) => a.create_id == b.Id) + .Where((a,b)=>a.workstation==input.stationId) .Select((a, b) => new FeedingRecordListOutput() { id = a.id, diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs index 44594713..80cc8a35 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs @@ -262,15 +262,25 @@ namespace Tnb.ProductionMgr public async Task InstockTypeOne(InstockInput inut) { string equip_code = inut.equip_code; + string label_code = inut.label_code; string as_location_code = inut.as_location_code; string warehouse_id = "2"; if (!string.IsNullOrEmpty(equip_code)) { throw Oops.Bah("请传机台号"); } + + if (!string.IsNullOrEmpty(label_code)) + { + throw Oops.Bah("请传标签号"); + } ISqlSugarClient db = _repository.AsSugarClient(); - EqpEquipment equipment = await db.Queryable().Where(x => x.code == equip_code).FirstAsync(); + EqpEquipment equipment = await db.Queryable() + .LeftJoin((x,y)=>x.id==y.equip_id) + .Where((x,y) => y.equip_code==equip_code && y.label_name==label_code && y.label_point=="提报装箱称重点位") + .Select((x,y)=>x) + .FirstAsync(); if (equipment == null) { throw Oops.Bah("未找到机台");