From 08665ff78fbc131fd647fad4ba48742faec53529 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期二, 12 七月 2022 11:27:51 +0800
Subject: [PATCH] 修改了 夏宝 车间看板 采购看板 缺料看板 根据系统设置默认车间过滤功能
---
WebAPI/Controllers/LMESController.cs | 172 ++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 128 insertions(+), 44 deletions(-)
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 828d0e7..f43a150 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -54,29 +54,40 @@
/// </summary>
[Route("LEMS/MES_Sc_ProcessExchangeBillQuery_Json")]
[HttpGet]
- public object MES_Sc_ProcessExchangeBillList_Json(string sWhere)
+ public object MES_Sc_ProcessExchangeBillList_Json(string sWhere,string user)
{
DataSet ds;
try
{
- SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere, "h_v_Sc_ProcessExchangeBillQuery");
- if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere+ " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery");
+
+ //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ //{
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ //}
+ //else
+ //{
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 0;
+ //objJsonResult.Message = "鏃犳暟鎹�";
+ //objJsonResult.data = null;
+ //return objJsonResult;
+ //}
}
catch (Exception e)
{
@@ -180,6 +191,9 @@
return GetObjectJson(ds);
}
+ #region 宸ヨ壓璺嚎
+
+ #region 宸ヨ壓璺嚎鍒楄〃
/// <summary>
/// 杩斿洖宸ヨ壓璺嚎鍒楄〃
///鍙傛暟锛歴tring sql銆�
@@ -187,20 +201,30 @@
/// </summary>
[Route("LEMS/MES_Gy_RoutingBillList_Json")]
[HttpGet]
- public object MES_Gy_RoutingBillList_Json(string sWhere)
+ public object MES_Gy_RoutingBillList_Json(string sWhere,string user)
{
DataSet ds;
try
{
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ //if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList ", "h_v_Gy_RoutingBillList");
+ ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList order by hmainid desc", "h_v_Gy_RoutingBillList");
}
else
{
string sql1 = "select * from h_v_Gy_RoutingBillList where 1 = 1 ";
- string sql = sql1 + sWhere;
+ string sql = sql1 + sWhere+ " order by hmainid desc";
ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList");
}
}
@@ -214,27 +238,31 @@
}
return GetObjectJson(ds);
}
+
+ #endregion
+
+ #region 宸ヨ壓璺嚎 鍒犻櫎
/// <summary>
/// 宸ヨ壓璺嚎鍒犻櫎鍔熻兘
/// </summary>
/// <returns></returns>
[Route("LEMS/DeltetGy_RoutingBillSub")]
[HttpGet]
- public object DeltetGy_RoutingBillSub(Int64 lngBillKey)
+ public object DeltetGy_RoutingBillSub(Int64 lngBillKey,string user)
{
DataSet ds;
- //string ModRightNameCheck = "Sc_ProcessReport_check";
+ string ModRightNameCheck = "Gy_RoutingBill_Drop";
try
{
//鍒犻櫎鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (lngBillKey == 0)
@@ -292,6 +320,52 @@
return objJsonResult;
}
}
+ #endregion
+
+ #region 宸ヨ壓璺嚎鍩虹鍒楄〃
+ /// <summary>
+ /// 杩斿洖宸ヨ壓璺嚎鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("LEMS/Gy_RoutingBillList")]
+ [HttpGet]
+ public object Gy_RoutingBillList(string sWhere, string user)
+ {
+ DataSet ds;
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ string sql1 = "select * from h_v_Gy_RoutingBillList_Base where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList_Base");
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ return GetObjectJson(ds);
+ }
+
+ #endregion
+
+ #endregion
/// <summary>
/// 杩斿洖鐢熶骇浠诲姟鍗曞垪琛�
@@ -300,12 +374,22 @@
/// </summary>
[Route("LEMS/MES_IF_ICMOBillList_Json")]
[HttpGet]
- public object MES_IF_ICMOBillList_Json(string sWhere)
+ public object MES_IF_ICMOBillList_Json(string sWhere,string user)
{
DataSet ds;
try
{
- ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1 = 1 " + sWhere + " order by hmainid desc", "h_v_IF_ICMOBillList");
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBillQuery", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1 = 1 " + sWhere + " order by HEntryID", "h_v_IF_ICMOBillList");
}
catch (Exception e)
{
@@ -359,22 +443,22 @@
{
try
{
- if (ds == null || ds.Tables[0].Rows.Count <= 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
+ //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ //{
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ //}
+ //else
+ //{
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 0;
+ //objJsonResult.Message = "鏃犳暟鎹�";
+ //objJsonResult.data = null;
+ //return objJsonResult;
+ //}
}
catch (Exception e)
{
--
Gitblit v1.9.1