From 918c8b4360a4d58c4162d4777575abf1d20ef007 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期三, 22 十一月 2023 08:57:55 +0800
Subject: [PATCH] 1.北鸣仓库看板接口 2.北鸣采购委外看板接口
---
VueWebApi/DLL/DAL/KanBanManagerentDAL.cs | 586 +++++++++-------------------------------------------------
1 files changed, 90 insertions(+), 496 deletions(-)
diff --git a/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs b/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
index 65943ae..bdfdbec 100644
--- a/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
+++ b/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
@@ -20,278 +20,17 @@
public static List<SqlParameter> listStr = new List<SqlParameter>(); //瀹氫箟鍏ㄥ眬鍙傛暟闆嗗悎
public static SqlParameter[] parameters; //瀹氫箟鍏ㄥ眬SqlParameter鍙傛暟鏁扮粍
- #region[姝f竻鍜岃溅闂寸湅鏉�,鑾峰彇鐢熶骇杞﹂棿]
- public static ToMessage ShopSearch()
- {
- string sql = "";
- string search = "";
- var dynamicParams = new DynamicParameters();
- try
- {
- //鑾峰彇杞﹂棿淇℃伅
- sql = @"select org_code ,org_name from TOrganization where is_delete='0' and description='W'";
- var data = DapperHelper.selectdata(sql, dynamicParams);
- 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[姝f竻鍜岃溅闂寸湅鏉�,宸︿笂浜х嚎鍔犲伐浠诲姟鎺ュ彛]
- public static ToMessage LineSearchTopLeftData(string shopcode)
- {
- string sql = "";
- List<ShopTopLeft> list = new List<ShopTopLeft>();
- var dynamicParams = new DynamicParameters();
- try
- {
- if (shopcode != null || shopcode != "") //浜х嚎缂栫爜涓嶄负绌�
- {
- string[] selects = Array.ConvertAll<string, string>(shopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- //鏌ヨ浜х嚎涓嬪凡寮�宸ョ殑鍔犲伐鍗曚俊鎭�
- sql = @"select * from (
- select distinct E.saleOrderCode,A.wo_code,P.plan_qty,M.partcode,M.partname,M.partspec,T.name as uomname,S.good_qty,S.ng_qty,S.bad_qty from TK_Wrk_Record A
- 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 and P.sourceid=E.id
- left join (
- select wo_code,sum(good_qty) as good_qty,sum(ng_qty) as ng_qty,sum(bad_qty) as bad_qty from TK_Wrk_Step where isend='Y' group by wo_code
- ) S on P.wo_code=S.wo_code
- where P.status<>'CLOSED' and P.status<>'NEW' and P.wkshp_code in @shopcode and A.style='S' and A.step_seq='1'
- ) as AA where AA.plan_qty>=(AA.good_qty+aa.bad_qty+AA.ng_qty)";
- var data0 = DapperHelper.selectlist(sql, new { shopcode = selects.ToArray() });
-
- if (data0.Rows.Count > 0)
- {
- for (int j = 0; j < data0.Rows.Count; j++)
- {
- string saleOrderCode = data0.Rows[j]["SALEORDERCODE"].ToString();//閿�鍞鍗曞彿
- string wo_code = data0.Rows[j]["WO_CODE"].ToString();//宸ュ崟鍙�
- string plan_qty = data0.Rows[j]["PLAN_QTY"].ToString();//浠诲姟鏁伴噺
- string partcode = data0.Rows[j]["PARTCODE"].ToString();//浜у搧缂栫爜
- string partname = data0.Rows[j]["PARTNAME"].ToString();//浜у搧鍚嶇О
- string partspec = data0.Rows[j]["PARTSPEC"].ToString();//浜у搧瑙勬牸
- string uomname = data0.Rows[j]["UOMNAME"].ToString();//鍗曚綅鍚嶇О
- ShopTopLeft lineone = new ShopTopLeft();
- lineone.saleordercode = saleOrderCode;
- lineone.workcode = wo_code;
- lineone.qty = plan_qty;
- lineone.partnumber = partcode;
- lineone.partname = partname;
- lineone.partspec = partspec;
- lineone.uom = uomname;
- lineone.children = new List<TreeTwo>();
-
- //鏌ユ柊宸ュ崟涓嬪伐搴忎俊鎭�
- sql = @"select A.seq,T.stepcode,T.stepname,A.plan_qty,A.start_qty,A.good_qty,A.ng_qty,A.status
- from TK_Wrk_Step A
- left join TStep T on A.step_code=T.stepcode
- where A.wo_code=@wo_code";
- dynamicParams.Add("@wo_code", wo_code);
- var data1 = DapperHelper.selectdata(sql, dynamicParams);
- for (int k = 0; k < data1.Rows.Count; k++)
- {
- string stepseq = data1.Rows[k]["SEQ"].ToString();//宸ュ簭搴忓彿
- string stepcode = data1.Rows[k]["STEPCODE"].ToString();//宸ュ簭缂栫爜
- string stepname = data1.Rows[k]["STEPNAME"].ToString();//宸ュ簭鍚嶇О
- string planqty = data1.Rows[k]["PLAN_QTY"].ToString();//浠诲姟鏁伴噺
- string startqty = data1.Rows[k]["START_QTY"].ToString();//寮�宸ユ暟閲�
- string good_qty = data1.Rows[k]["GOOD_QTY"].ToString();//鎶ュ伐鏁伴噺
- string ng_qty = data1.Rows[k]["NG_QTY"].ToString();//涓嶈壇鏁伴噺
- string status = data1.Rows[k]["STATUS"].ToString();//鐘舵��
- TreeTwo linetwo = new TreeTwo();
- linetwo.stepseq = stepseq;
- linetwo.stepcode = stepcode;
- linetwo.stepname = stepname;
- linetwo.planqty = planqty;
- linetwo.startqty = startqty;
- linetwo.goodqty = good_qty;
- linetwo.ngqty = ng_qty;
- linetwo.status = status;
- lineone.children.Add(linetwo);
- }
- list.Add(lineone);
- }
- }
- else
- {
- mes.code = "300";
- mes.Message = "褰撳墠杞﹂棿涓嬫棤鍦ㄧ敓浜т换鍔�!";
- mes.data = null;
- }
- }
- else
- {
- mes.code = "300";
- mes.Message = "杞﹂棿鍙傛暟涓嶈兘涓虹┖!";
- mes.data = null;
- }
- }
- catch (Exception e)
- {
- mes.code = "300";
- mes.count = 0;
- mes.Message = e.Message;
- mes.data = null;
- }
- mes.code = "200";
- mes.Message = "鏌ヨ鎴愬姛!";
- mes.data = list;
- return mes;
- }
- #endregion\
-
- #region[姝f竻鍜岃溅闂寸湅鏉�,宸︿笅鍒楄〃鎺ュ彛]
- public static ToMessage LineSearchBottomLeftData(string shopcode)
- {
- string sql = "";
- var dynamicParams = new DynamicParameters();
- string[] selects = Array.ConvertAll<string, string>(shopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- try
- {
- //鑾峰彇浠诲姟鍒楄〃淇℃伅
- sql = @"select A.*,ROW_NUMBER() OVER(ORDER BY (case when A.warning<=2 then A.planenddate end) asc ,A.planstartdate asc) AS RowNum from(
- select A.status,A.lm_date,E.saleOrderCode,A.wo_code,M.partcode,M.partname,M.partspec,U.name,
- 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 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.wkshp_code in @shopcode and A.is_delete<>'1' and B.isend='Y'
- and A.plan_qty>=(B.good_qty+B.ng_qty+B.bad_qty)
- )as A ";
- var data = DapperHelper.selectlist(sql, new { shopcode = selects.ToArray() });
- 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[姝f竻鍜岃溅闂寸湅鏉�,鍙充笂top鎺掕鎺ュ彛,褰撴棩]
- public static ToMessage LineSearchTopRightData(string shopcode)
- {
- string sql = "";
- var dynamicParams = new DynamicParameters();
- string[] selects = Array.ConvertAll<string, string>(shopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- try
- {
- //鑾峰彇浜у搧鎶ュ伐top5淇℃伅
- sql = @"select top 5 A.org_name as wkshname,A.name as linename,A.partname,isnull(sum(A.good_qty),0) as good_qty from(
- select W.org_name,E.name,M.partname,A.good_qty from TK_Wrk_Record A
- inner join TK_Wrk_Step S on A.wo_code=S.wo_code and A.step_code=S.step_code
- inner join TMateriel_Info M on A.materiel_code=M.partcode
- inner join TEqpInfo E on A.eqp_code=E.code
- inner join TOrganization W on E.wksp_code=W.org_code and W.description='W'
- where A.style='B' and S.isend='Y' and W.org_code in @shopcode and datediff(day,GETDATE(),A.lm_date)=0
- union all
- select C.name as linename,'' as wkshname,M.partname,A.sqty as good_qty from TK_Wrk_OutRecord A
- inner join TK_Wrk_Step S on A.wo_code=S.wo_code and A.step_code=S.step_code
- inner join TMateriel_Info M on A.materiel_code=M.partcode
- inner join TCustomer C on A.wx_code=C.code
- where A.style='S' and S.isend='Y' and datediff(day,GETDATE(),A.lm_date)=0
- ) as A group by A.org_name,A.name,A.partname order by good_qty desc";
- var data = DapperHelper.selectlist(sql, new { shopcode = selects.ToArray() });
- 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[姝f竻鍜岃溅闂寸湅鏉�,鍙充笅top鎺掕鎺ュ彛,褰撳墠鏃堕棿寰�鍓嶄竴鍛╙
- public static ToMessage LineSearchBottomRightData(string shopcode)
- {
- string sql = "";
- var dynamicParams = new DynamicParameters();
- string[] selects = Array.ConvertAll<string, string>(shopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- try
- {
- //鑾峰彇鎶ュ伐涓嶈壇娆℃暟top5淇℃伅
- sql = @"select B.name, COUNT(*) as cont
- from CSR_WorkRecord_Defect A
- inner join TDefect B on CHARINDEX(',' + B.code + ',', ',' + A.defect_code + ',') > 0
- inner join TK_Wrk_Man M on A.wo_code=M.wo_code
- where M.wkshp_code in @shopcode
- group by B.name order by cont desc";
- var data = DapperHelper.selectlist(sql, new { shopcode = selects.ToArray() });
- 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[姝f竻鍜岃溅闂磋川閲忔暟瀛楀寲鐪嬫澘,top5涓嶈壇]
- public static ToMessage QCBadTop(string wkshopcode)
+ #region[鍖楅福浠撳簱鐪嬫澘宸︿笂,鐢熶骇寰呭叆搴揮
+ public static ToMessage ProductionStockedInLeftTop()
{
var sql = "";
- var dynamicParams = new DynamicParameters();
- Dictionary<object, object> dir = new Dictionary<object, object>();
try
{
- string[] wkshoplist = Array.ConvertAll<string, string>(wkshopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- sql = @"select * from h_v_DDKanBan_QCBadTop";
+ sql = @"select * from h_v_BMKanBan_ProductionNotReceived";
var data = DapperHelper.selecttable(sql);
-
- var top = data.AsEnumerable().GroupBy(row => row.Field<string>("name"))
- .Select(group => new
- {
- name = group.Key,
- cont = group.Sum(row => row.Field<int>("cont"))
- }).ToList();
- dir.Add("ALL", top);
- for (int i = 0; i < wkshoplist.Length; i++)
- {
- var top0 = data.AsEnumerable()
- .Where(row => row.Field<string>("wkshp_code")== wkshoplist[i].ToString()) // 娣诲姞鏌ヨ鏉′欢
- .GroupBy(row =>row.Field<string>("name"))
- .Select(group => new
- {
- name = group.Key,
- cont = group.Sum(row => row.Field<int>("cont"))
- }).ToList();
- dir.Add(wkshoplist[i].ToString(), top0);
- }
mes.code = "200";
mes.Message = "鏌ヨ鎴愬姛!";
- mes.data = dir;
+ mes.data = data;
}
catch (Exception e)
{
@@ -304,115 +43,13 @@
}
#endregion
- #region[姝f竻鍜岃溅闂磋川閲忔暟瀛楀寲鐪嬫澘,宸︿腑鍛ㄤ笉鑹秼鍔縘
- public static ToMessage QCBadCenterLeftWeek(string wkshopcode)
- {
- string sql = "";
- Dictionary<object, object> dir = new Dictionary<object, object>();
- try
- {
- //瀵屽皵杈捐溅闂磋川閲忔暟瀛楀寲鐪嬫澘,鍛ㄤ笉鑹秼鍔�(褰撳墠鏃堕棿寰�鍓嶄竴鍛�)
- //瀛樺偍杩囩▼鍚�
- string[] wkshoplist = Array.ConvertAll<string, string>(wkshopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- sql = @"h_p_KanBan_QCBadCenterLeft";
- for (int i = 0; i < wkshoplist.Length; i++)
- {
- var dynamicParams = new DynamicParameters();
- dynamicParams.Add("@wkshop_code", wkshoplist[i].ToString());
- var dt = DapperHelper.selectProcedure(sql, dynamicParams);
- dir.Add(wkshoplist[i].ToString(), dt);
- }
-
- mes.code = "200";
- mes.Message = "鏌ヨ鎴愬姛!";
- mes.data = dir;
- }
- catch (Exception e)
- {
- mes.code = "300";
- mes.count = 0;
- mes.Message = e.Message;
- mes.data = null;
- }
- return mes;
- }
- #endregion
-
- #region[姝f竻鍜岃溅闂磋川閲忔暟瀛楀寲鐪嬫澘,鍙充腑鍛ㄥ畬鎴愭暟/鐜嘳
- public static ToMessage QCBadCenterRightWeek(string wkshopcode)
+ #region[鍖楅福浠撳簱鐪嬫澘宸︿笅,浜у搧浠e彂璐
+ public static ToMessage ProductConsignmentLeftBottom()
{
var sql = "";
- var dynamicParams = new DynamicParameters();
- Dictionary<object, object> dir = new Dictionary<object, object>();
try
{
- string[] wkshoplist = Array.ConvertAll<string, string>(wkshopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- sql = @"select * from h_v_DDKanBan_QCBadCenterRight";
- var data = DapperHelper.selecttable(sql);
- for (int i = 0; i < wkshoplist.Length; i++)
- {
- var top0 = data.AsEnumerable()
- .Where(row => row.Field<string>("wkshp_code") == wkshoplist[i].ToString()) // 娣诲姞鏌ヨ鏉′欢
- .Select(group => new
- {
- wkshp_code = group.Field<string>("wkshp_code"),
- plan_qty= group.Field<decimal>("plan_qty"),
- good_qty = group.Field<decimal>("good_qty"),
- radio = group.Field<decimal>("radio")
- }).ToList();
- dir.Add(wkshoplist[i].ToString(), top0);
- }
- mes.code = "200";
- mes.Message = "鏌ヨ鎴愬姛!";
- mes.data = dir;
- }
- catch (Exception e)
- {
- mes.code = "300";
- mes.count = 0;
- mes.Message = e.Message;
- mes.data = null;
- }
- return mes;
- }
- #endregion
-
- #region[姝f竻鍜岃溅闂磋川閲忔暟瀛楀寲鐪嬫澘,涓嬩换鍔¤繘搴
- public static ToMessage QCBadBottomWeek(string wkshopcode)
- {
- string sql = "";
- var dynamicParams = new DynamicParameters();
- try
- {
- string[] wkshoplist = Array.ConvertAll<string, string>(wkshopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- sql = @"select * from h_v_DDKanBan_QCBadBottom where wkshp_code in @wkshoplist";
- dynamicParams.Add("@wkshoplist", wkshoplist);
- var data = DapperHelper.selectdata(sql, dynamicParams);
- 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[姝f竻鍜屼粨搴撶湅鏉�,宸︿笂浜у搧寰呭叆搴撳垪琛╙
- public static ToMessage WareHouseTopLeftData()
- {
- string sql = "";
- try
- {
- //鑾峰彇浠撳簱鐢熶骇鍔犲伐鍗曞緟鍏ュ簱鍒楄〃
- sql = @"select * from h_v_DDKanBan_WareHouseTopLeft order by voucherdate";
+ sql = @"select * from h_v_BMKanBan_ProductionNotDeliver";
var data = DapperHelper.selecttable(sql);
mes.code = "200";
mes.Message = "鏌ヨ鎴愬姛!";
@@ -429,122 +66,17 @@
}
#endregion
- #region[姝f竻鍜屼粨搴撶湅鏉�,宸︿笅浜у搧寰呭彂璐у垪琛╙
- public static ToMessage WareHouseTopBottomData()
- {
- string sql = "";
- try
- {
- //鑾峰彇浠撳簱鐢熶骇鍔犲伐鍗曞緟鍏ュ簱鍒楄〃
- sql = @"select * from h_v_DDKanBan_WareHouseTopBottom order by voucherdate";
- 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[姝f竻鍜屼粨搴撶湅鏉�,鍙充笂鎴愬搧搴撱�佸崐鎴愬搧搴搕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[姝f竻鍜屼粨搴撶湅鏉�,鍙充笅鍘熸枡搴撳簱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
-
-
-
- #region[姝f竻鍜岃溅闂寸患鍚堢湅鏉�,宸︿笂鐢熶骇璁㈠崟]
- public static ToMessage WorkShopCompreLeftTop(string wkshopcode)
+ #region[鍖楅福浠撳簱鐪嬫澘鍙充笂,杩戜竴鍛ㄧ敓浜у緟鍏ュ簱浜у搧鎺掕TOP5]
+ public static ToMessage ProductionStockedInRightTop()
{
var sql = "";
- var dynamicParams = new DynamicParameters();
- Dictionary<object, object> dir = new Dictionary<object, object>();
- Dictionary<object, object> dir0 = new Dictionary<object, object>();
- Dictionary<object, object> dir1 = new Dictionary<object, object>();
try
{
- string[] wkshoplist = Array.ConvertAll<string, string>(wkshopcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- sql = @"select * from h_v_DDKanBan_WorkShopCompreLeftTop";
+ sql = @"select * from h_v_BMKanBan_ProductionNotReceivedSumTop";
var data = DapperHelper.selecttable(sql);
- sql = @"select * from h_v_DDKanBan_WorkShopCompreLeftCenter";
- var data1 = DapperHelper.selecttable(sql);
- for (int i = 0; i < wkshoplist.Length; i++)
- {
- var top0 = data.AsEnumerable()
- .Where(row => row.Field<string>("wkshp_code") == wkshoplist[i].ToString()) // 娣诲姞鏌ヨ鏉′欢
- .Select(group => new
- {
- wkshp_code = group.Field<string>("wkshp_code"),
- plan_qty = group.Field<decimal>("plan_qty"),
- good_qty = group.Field<decimal>("good_qty")
- }).DefaultIfEmpty(new { wkshp_code = wkshoplist[i].ToString(), plan_qty = 0m, good_qty = 0m })//涓虹┖鏃舵寚瀹氶粯璁ゅ��
- .ToList();
- dir0.Add(wkshoplist[i].ToString(), top0);
-
- var top1 = data1.AsEnumerable()
- .Where(row => row.Field<string>("wkshp_code") == wkshoplist[i].ToString()) // 娣诲姞鏌ヨ鏉′欢
- .Select(group => new
- {
- wkshp_code = group.Field<string>("wkshp_code"),
- plan_qty = group.Field<decimal>("plan_qty"),
- quantity = group.Field<decimal>("quantity")
- }).DefaultIfEmpty(new { wkshp_code = wkshoplist[i].ToString(), plan_qty = 0m,quantity = 0m })//涓虹┖鏃舵寚瀹氶粯璁ゅ��
- .ToList();
- dir1.Add(wkshoplist[i].ToString(), top1);
- }
- dir.Add("LeftTop", dir0);
- dir.Add("LeftBottom", dir1);
mes.code = "200";
mes.Message = "鏌ヨ鎴愬姛!";
- mes.data = dir;
+ mes.data = data;
}
catch (Exception e)
{
@@ -557,22 +89,17 @@
}
#endregion
- #region[姝f竻鍜岃溅闂寸患鍚堢湅鏉�,鍙充笂閿�鍞鍗昡
- public static ToMessage WorkShopCompreRightTop()
+ #region[鍖楅福浠撳簱鐪嬫澘鍙充笅,杩戜竴鍛ㄩ攢鍞緟鍙戣揣浜у搧鎺掕TOP5]
+ public static ToMessage ProductionStockedInRightBottom()
{
var sql = "";
- Dictionary<object, object> dir = new Dictionary<object, object>();
try
{
- sql = @"select * from h_v_DDKanBan_WorkShopCompreRightTop";
+ sql = @"select * from h_v_BMKanBan_ProductionNotDeliverSumTop";
var data = DapperHelper.selecttable(sql);
- sql = @"select * from h_v_DDKanBan_WorkShopCompreRightCenter";
- var data1 = DapperHelper.selecttable(sql);
- dir.Add("RightTop", data);
- dir.Add("RightBottom", data1);
mes.code = "200";
mes.Message = "鏌ヨ鎴愬姛!";
- mes.data = dir;
+ mes.data = data;
}
catch (Exception e)
{
@@ -585,21 +112,88 @@
}
#endregion
- #region[姝f竻鍜岃溅闂寸患鍚堢湅鏉�,鍙充笅搴撳瓨]
- public static ToMessage WorkShopCompreRightBottom()
+
+
+ #region[鍖楅福閲囪喘濮斿鐪嬫澘宸︿笂,閲囪喘寰呭叆搴揮
+ public static ToMessage ProcureOutsourcLeftTop()
{
var sql = "";
- Dictionary<object, object> dir = new Dictionary<object, object>();
try
{
- sql = @"select * from h_v_DDKanBan_WorkShopCompreRightBottom";
+ sql = @"select * from h_v_BMKanBan_ProcureNotReceived";
var data = DapperHelper.selecttable(sql);
- dir.Add("Y", data.Rows[0]["BaseQuantity"].ToString());
- dir.Add("B", data.Rows[1]["BaseQuantity"].ToString());
- dir.Add("C", data.Rows[2]["BaseQuantity"].ToString());
mes.code = "200";
mes.Message = "鏌ヨ鎴愬姛!";
- mes.data = dir;
+ 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 ProcureOutsourcLeftBottom()
+ {
+ var sql = "";
+ try
+ {
+ sql = @"select * from h_v_BMKanBan_OutSourcingNotReceived";
+ 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 ProcureOutsourcRightTop()
+ {
+ var sql = "";
+ try
+ {
+ sql = @"select * from h_v_BMKanBan_ProcureNotReceivedSumTop";
+ 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 ProcureOutsourcRightBottom()
+ {
+ var sql = "";
+ try
+ {
+ sql = @"select * from h_v_BMKanBan_OutSourcingNotReceivedSumTop";
+ var data = DapperHelper.selecttable(sql);
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.data = data;
}
catch (Exception e)
{
--
Gitblit v1.9.3