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 | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 103 insertions(+), 6 deletions(-)
diff --git a/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs b/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
index 57ef245..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'
@@ -354,5 +355,101 @@
return mes;
}
#endregion
+
+
+
+ #region[澶у矝浠撳簱鐪嬫澘,宸︿笂浜у搧寰呭叆搴撳垪琛╙
+ public static ToMessage WareHouseTopLeftData()
+ {
+ string sql = "";
+ try
+ {
+ //鑾峰彇浠撳簱鐢熶骇鍔犲伐鍗曞緟鍏ュ簱鍒楄〃
+ sql = @"select * from h_v_DDKanBan_WareHouseTopLeft";
+ var data = DapperHelper.selecttable(sql);
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.data = data;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
+
+ #region[澶у矝浠撳簱鐪嬫澘,宸︿笅浜у搧寰呭彂璐у垪琛╙
+ public static ToMessage WareHouseTopBottomData()
+ {
+ string sql = "";
+ try
+ {
+ //鑾峰彇浠撳簱鐢熶骇鍔犲伐鍗曞緟鍏ュ簱鍒楄〃
+ sql = @"select * from h_v_DDKanBan_WareHouseTopBottom";
+ var data = DapperHelper.selecttable(sql);
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.data = data;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
+
+ #region[澶у矝浠撳簱鐪嬫澘,鍙充笂鎴愬搧搴撱�佸崐鎴愬搧搴搕op5搴撳瓨鎺掕]
+ public static ToMessage WareHouseRightTopData()
+ {
+ string sql = "";
+ try
+ {
+ sql = @"select * from h_v_DDKanBan_WareHouseRightTop";
+ var data = DapperHelper.selecttable(sql);
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.data = data;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
+
+ #region[澶у矝浠撳簱鐪嬫澘,鍙充笅鍘熸枡搴撳簱top5搴撳瓨鎺掕]
+ public static ToMessage WareHouseRightBottomData()
+ {
+ string sql = "";
+ try
+ {
+ sql = @"select * from h_v_DDKanBan_WareHouseRightBottom";
+ var data = DapperHelper.selecttable(sql);
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.data = data;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.3