From 470ae8e8f6a1142f6c77801c66ea308884dc88d2 Mon Sep 17 00:00:00 2001 From: qianjiawei <1184704771@qq.com> Date: Fri, 21 Jul 2023 17:02:50 +0800 Subject: [PATCH 1/4] 1 --- .../Tnb.ProductionMgr/PrdMoTaskService.cs | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 6886f5fd..f6014392 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -685,7 +685,15 @@ namespace Tnb.ProductionMgr { await db.Ado.BeginTranAsync(); row = await db.Insertable(moTask).ExecuteCommandAsync(); - + #region 质检模块 + //质检 + TriggerPlanEntity entity = new TriggerPlanEntity(); + entity.materialid = moTask.material_id; + entity.processid = moTask.process_id; + entity.workid = moTask.workstation_id; + entity.triggerevent = EnumTriggerEvent.首件检新的生产任务; + await _qcCheckPlanService.CreateTask(entity); + #endregion //根据工单号获取当前工单包含的已排产数 var schedQty = db.Queryable().Where(it => it.mo_id == input.mo_id)?.Sum(d => d.scheduled_qty); @@ -802,6 +810,17 @@ namespace Tnb.ProductionMgr // } // } row = await _db.Insertable(moTask).ExecuteCommandAsync(); + #region 质检模块 + //质检 + TriggerPlanEntity entity = new TriggerPlanEntity(); + entity.materialid = moTask.material_id; + entity.processid = moTask.process_id; + entity.workid = moTask.workstation_id; + entity.triggerevent = EnumTriggerEvent.首件检新的生产任务; + await _qcCheckPlanService.CreateTask(entity); + + #endregion + var material_h = await _db.Queryable().FirstAsync(it => it.id == moTask.material_id); //添加生产任务操作记录日志 var taskLog = new PrdTaskLog(); From 9802bea65a06bd14341ab9a2cd8b63d03ed5d65b Mon Sep 17 00:00:00 2001 From: zhoukeda <1315948824@qq.com> Date: Fri, 21 Jul 2023 17:06:51 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs index c56832e0..1406b23d 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs @@ -64,7 +64,7 @@ namespace Tnb.ProductionMgr is_check = input.is_check, org_id = _userManager.GetUserInfo().Result.organizeId, warehouse_id = location?.wh_id, - status = 0, + status = 1, }; foreach (var item in input.details) @@ -181,7 +181,7 @@ namespace Tnb.ProductionMgr foreach (var item in details) { - await db.Updateable().SetColumns(x => x.status == 1) + await db.Updateable().SetColumns(x => x.status == 2) .Where(x => x.id == item.report_id).ExecuteCommandAsync(); } } From 2141a1bedbea3f7b7308c600772b21f9bf718835 Mon Sep 17 00:00:00 2001 From: zhoukeda <1315948824@qq.com> Date: Fri, 21 Jul 2023 17:08:20 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E7=8A=B6=E6=80=81=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdInstockH.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdInstockH.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdInstockH.cs index 390c5651..90149625 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdInstockH.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdInstockH.cs @@ -56,7 +56,7 @@ public partial class PrdInstockH : BaseEntity public string? org_id { get; set; } /// - /// 状态 1 申请入库 2 已入库 + /// 状态 0 申请入库 1 已入库 /// public int? status { get; set; } From 60d9f17017c73f0c653a81c6e8b59a91bcc36dda Mon Sep 17 00:00:00 2001 From: zhoukeda <1315948824@qq.com> Date: Fri, 21 Jul 2023 17:10:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs index 1406b23d..c56832e0 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs @@ -64,7 +64,7 @@ namespace Tnb.ProductionMgr is_check = input.is_check, org_id = _userManager.GetUserInfo().Result.organizeId, warehouse_id = location?.wh_id, - status = 1, + status = 0, }; foreach (var item in input.details) @@ -181,7 +181,7 @@ namespace Tnb.ProductionMgr foreach (var item in details) { - await db.Updateable().SetColumns(x => x.status == 2) + await db.Updateable().SetColumns(x => x.status == 1) .Where(x => x.id == item.report_id).ExecuteCommandAsync(); } }