From 18ca81b6dd7ad6cc89b07c8865be2b9b4a30e258 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期一, 29 三月 2021 17:03:31 +0800
Subject: [PATCH] nothing
---
WebAPI/Controllers/LMESController.cs | 193 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 190 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 698ffe6..182059e 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -73,7 +73,11 @@
}
catch (Exception e)
{
- ds = null;
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
}
return GetObjectJson(ds);
}
@@ -97,7 +101,11 @@
}
catch (Exception e)
{
- ds = null;
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
}
return GetObjectJson(ds);
}
@@ -223,6 +231,111 @@
string sql1 = "select * from h_v_IF_ICMOBillList where 1 = 1 ";
string sql = sql1 + sWhere;
ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOBillList");
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ return GetObjectJson(ds);
+ }
+
+ /// <summary>
+ /// 杩斿洖鐢熶骇姹囨姤鍗曞垪琛�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("LEMS/MES_Sc_ProcessReportList_Json")]
+ [HttpGet]
+ public object MES_Sc_ProcessReportList_Json(string sWhere)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select top 500 * from Sc_ProcessReportMain ", "Sc_ProcessReportMain");
+ }
+ else
+ {
+ string sql1 = "select * from Sc_ProcessReportMain where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Sc_ProcessReportMain");
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ return GetObjectJson(ds);
+ }
+
+ /// <summary>
+ /// 杩斿洖鐢熶骇宸ュ簭璁″垝鍗曞垪琛�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("LEMS/MES_Sc_ProcessPlanMain_Json")]
+ [HttpGet]
+ public object MES_Sc_ProcessPlanMain_Json(string sWhere)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select top 500 * from Sc_ProcessPlanMain ", "Sc_ProcessPlanMain");
+ }
+ else
+ {
+ string sql1 = "select * from Sc_ProcessPlanMain where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Sc_ProcessPlanMain");
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ return GetObjectJson(ds);
+ }
+
+ /// <summary>
+ /// 杩斿洖鐢熶骇宸ュ簭娲惧伐鍗曞垪琛�
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <returns></returns>
+ [Route("LEMS/MES_Sc_ProcessSendWorkMain_Json")]
+ [HttpGet]
+ public object MES_Sc_ProcessSendWorkMain_Json(string sWhere)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select top 500 * from Sc_ProcessSendWorkMain ", "Sc_ProcessSendWorkMain");
+ }
+ else
+ {
+ string sql1 = "select * from Sc_ProcessSendWorkMain where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Sc_ProcessSendWorkMain");
}
}
catch (Exception e)
@@ -1022,6 +1135,80 @@
return GetObjectJson(ds);
}
- //
+ /// <summary>
+ /// 杩斿洖澧欏挃宸ヨ祫缁熻鎶ヨ〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("LEMS/MES_Qk_OutProcessList_Json")]
+ [HttpGet]
+ public object MES_Qk_OutProcessList_Json(string sWhere)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("select * from (select min(a.HDate) 璧峰鏃堕棿, max(a.HDate) 鎴嚦鏃堕棿, b.HName 宸ュ簭鍚嶇О, c.HName 鐝粍鍚嶇О, d.HName 姹囨姤浜�, sum(a.HQty) 鍚堣姹囨姤鏁伴噺, sum(b.HFixPrice * a.HQty) 鍚堣宸ヨ祫 from Sc_StationOutBillMain a left join Gy_Process b on a.HProcID = b.HItemID Left join Gy_Group c on a.HGroupID = c.HItemID left join Gy_Employee d on a.HEmpID = d.HItemID where 1=1 group by b.HName,c.HName,d.HName) t where 1=1 " + sWhere, "Sc_StationOutBillMain");
+ }
+ catch (Exception e)
+ {
+ ds = null;
+ }
+ return GetObjectJson(ds);
+ }
+
+ //鍗曡鍒犻櫎杩涚珯鎺ユ敹鍗曞垪琛�
+ [Route("LEMS/StationInBillListDelete_Json")]
+ [HttpGet]
+ public object StationInBillListDelete_Json(long sHInterID)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ oCn.RunProc("Delete from Sc_StationInBillMain where HInterID=" + sHInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.code = "200";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "000";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.data = e.ToString();
+ return objJsonResult;
+ }
+
+ }
+
+ //鍗曡鍒犻櫎鍑虹珯姹囨姤鍗曞垪琛�
+ [Route("LEMS/StationOutBillListDelete_Json")]
+ [HttpGet]
+ public object StationOutBillListDelete_Json(long sHInterID)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ oCn.RunProc("Delete from Sc_StationOutBillMain where HInterID=" + sHInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.code = "200";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "000";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.data = e.ToString();
+ return objJsonResult;
+ }
+
+ }
+
+ //
}
}
\ No newline at end of file
--
Gitblit v1.9.1