From 2264c47cff7ab5ce52d7c158ac0eb941e7b46506 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期三, 31 八月 2022 23:50:53 +0800
Subject: [PATCH] 大岛测试bug修改
---
VueWebApi/DLL/DAL/KanBanManagerentDAL.cs | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs b/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
index 9f927ac..80932cc 100644
--- a/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
+++ b/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
@@ -71,10 +71,11 @@
line.linename = json[i].name;
//鑾峰彇浜х嚎涓嬪紑宸ユ�诲崟閲�
sql = @"select COUNT(*) cont from(
- select distinct B.rout_code,M.wo_code from TFlw_Rteqp A
- inner join TFlw_Rtdt B on A.step_code=B.step_code
- inner join TK_Wrk_Man M on B.rout_code=M.route_code
- where M.status<>'CLOSED' and M.is_delete<>'1' and A.eqp_code=@linecode) as A";
+ select distinct B.rout_code,M.wo_code from TK_Wrk_Man M
+ left join TFlw_Rtdt B on M.route_code=B.rout_code
+ left join TFlw_Rteqp R on B.step_code=R.step_code
+ where M.status<>'CLOSED' and M.is_delete<>'1'
+ and R.eqp_code=@linecode) as A";
dynamicParams.Add("@linecode", json[i].code);
var data = DapperHelper.selectdata(sql, dynamicParams);
if (data.Rows.Count > 0 && decimal.Parse(data.Rows[0]["CONT"].ToString())>0)
@@ -86,7 +87,7 @@
inner join TK_Wrk_Man P on A.wo_code=P.wo_code
left join TMateriel_Info M on P.materiel_code=M.partcode
left join TUom T on M.uom_code=T.code
- left join TKimp_Ewo E on P.m_po=E.wo
+ left join TKimp_Ewo E on P.m_po=E.wo and P.sourceid=E.id
where P.status<>'CLOSED' and P.status<>'NEW' and A.eqp_code=@linecode and A.style='S' and A.step_seq='1'";
dynamicParams.Add("@linecode", json[i].code);
var data0 = DapperHelper.selectdata(sql, dynamicParams);
@@ -194,7 +195,7 @@
A.plan_qty,B.good_qty,B.ng_qty,E.planstartdate,E.planenddate, datediff(day,getdate(),E.planenddate) warning
from TK_Wrk_Man A
inner join TK_Wrk_Step B on A.wo_code=B.wo_code
- inner join TKimp_Ewo E on A.m_po=E.wo
+ inner join TKimp_Ewo E on A.m_po=E.wo and A.sourceid=E.id
left join TMateriel_Info M on A.materiel_code=M.partcode
left join TUom U on M.uom_code=U.code
where A.status<>'CLOSED' and A.is_delete<>'1' and B.isend='Y'
--
Gitblit v1.9.3