From 9e5b97b797f089f8d36711cb941ce8f0f48592c0 Mon Sep 17 00:00:00 2001
From: zhoukeda <1315948824@qq.com>
Date: Thu, 27 Jul 2023 09:35:26 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E8=A3=85=E5=8C=85=E8=A3=85=E4=BB=BB?=
=?UTF-8?q?=E5=8A=A1=E5=8D=95=E4=B8=8B=E5=8F=91=E5=8A=A0=E5=AE=8C=E6=88=90?=
=?UTF-8?q?=E6=95=B0=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Dto/PrdManage/PackSechelToBeIssueListOutput.cs | 4 ++++
ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs | 2 ++
2 files changed, 6 insertions(+)
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PackSechelToBeIssueListOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PackSechelToBeIssueListOutput.cs
index 66d4d2ec..12e0029e 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PackSechelToBeIssueListOutput.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PackSechelToBeIssueListOutput.cs
@@ -57,6 +57,10 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
///
public int? plan_qty { get; set; }
///
+ /// 已完成数量
+ ///
+ public int? complete_qty { get; set; }
+ ///
/// 工序任务量
///
public int? process_task_qty { get; set; }
diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs
index 227988a8..8a0f1357 100644
--- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs
@@ -389,6 +389,7 @@ namespace Tnb.ProductionMgr
// scheduled_qty = SqlFunc.Subqueryable().Where(it => it.mo_id == a.mo_id).Sum(it => it.scheduled_qty),
scheduled_qty = a.scheduled_qty,
plan_qty = SqlFunc.Subqueryable().Where(it => it.id == a.mo_id).Select(it => it.plan_qty),
+ complete_qty = a.last_process_complete_qty,
estimated_start_date = a.estimated_start_date==null ? null : a.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm"),
estimated_end_date = a.estimated_end_date==null ? null : a.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm"),
bom_id = d.id,
@@ -425,6 +426,7 @@ namespace Tnb.ProductionMgr
scheduled_qty = a.scheduled_qty,
plan_qty = d.plan_qty,
process_task_qty = a.process_task_qty,
+ complete_qty = SqlFunc.IsNull(a.reported_work_qty,0)+SqlFunc.IsNull(a.scrap_qty,0),
estimated_start_date = a.estimated_start_date==null ? null : a.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm"),
estimated_end_date = a.estimated_end_date==null ? null : a.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm"),
process_name = e.process_name,