From 819289e1cfaa581fd6aafe9e43f5450d2860ba56 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期三, 08 三月 2023 12:48:44 +0800
Subject: [PATCH] 车间看板四个角数据关联设备取报工记录设备
---
VueWebApi/DLL/DAL/KanBanManagerentDAL.cs | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs b/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
index e47f525..860ce4e 100644
--- a/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
+++ b/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
@@ -462,15 +462,26 @@
try
{
//鑾峰彇浜х嚎閿�鍞鍗曟姤宸ヤ俊鎭�,鎶ュ伐鏁伴噺>0 涓斿伐鍗曠姸鎬佷负闈炲叧闂姸鎬� 涓斿伐搴忎负鏈亾宸ュ簭 锛�--and (S.good_qty+S.ng_qty+S.bad_qty)<S.plan_qty)
+ //sql = @"select AA.saleOrderCode,AA.materiel_code,AA.partname,sum(AA.good_qty) as good_qty from (
+ // select distinct A.saleOrderCode,A.materiel_code,M.partname,isnull(S.good_qty,0) as good_qty
+ // from TKimp_Ewo A
+ // left join TK_Wrk_Man B on A.wo=B.m_po and A.materiel_code=B.materiel_code
+ // left join TK_Wrk_Step S on B.wo_code=S.wo_code and S.isend='Y'
+ // left join TFlw_Rteqp R on S.step_code=R.step_code
+ // left join TMateriel_Info M on A.materiel_code=M.partcode
+ // where A.saleOrderCode is not null and A.saleOrderCode<>''
+ // and R.eqp_code=@lineCode and B.status<>'CLOSED'
+ // ) as AA
+ // group by AA.saleOrderCode,AA.materiel_code,AA.partname";
sql = @"select AA.saleOrderCode,AA.materiel_code,AA.partname,sum(AA.good_qty) as good_qty from (
select distinct A.saleOrderCode,A.materiel_code,M.partname,isnull(S.good_qty,0) as good_qty
from TKimp_Ewo A
left join TK_Wrk_Man B on A.wo=B.m_po and A.materiel_code=B.materiel_code
left join TK_Wrk_Step S on B.wo_code=S.wo_code and S.isend='Y'
- left join TFlw_Rteqp R on S.step_code=R.step_code
+ left join TK_Wrk_Record T on S.wo_code=T.wo_code
left join TMateriel_Info M on A.materiel_code=M.partcode
where A.saleOrderCode is not null and A.saleOrderCode<>''
- and R.eqp_code=@lineCode and B.status<>'CLOSED'
+ and T.eqp_code=@lineCode and B.status<>'CLOSED'
) as AA
group by AA.saleOrderCode,AA.materiel_code,AA.partname";
dynamicParams.Add("@lineCode", lineCode);
--
Gitblit v1.9.3