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("未找到机台");