From a1757ed4d0a21ae1df5a184da8466d5f663fae17 Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期二, 13 六月 2023 09:10:23 +0800 Subject: [PATCH] 新增托调拨调拨单缓存列表模块所需调用方法 --- WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs b/WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs index 9d779c3..a5bae28 100644 --- a/WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs +++ b/WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs @@ -27,7 +27,21 @@ { try { + ds = oCN.RunProcReturn("select * from Xt_grdAlignment_WMES where HModName='" + HModName + "' and HUserName='" + user + "'", "Xt_grdAlignment_WMES"); + + if (ds.Tables[0].Rows.Count == 0) + { + ds = oCN.RunProcReturn("select * from Xt_grdAlignment_WMES where HModName='" + HModName + "' and (HUserName='admin' or HUserName='Admin')", "Xt_grdAlignment_WMES"); + + if (ds.Tables[0].Rows.Count == 0) { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } objJsonResult.code = "1"; objJsonResult.count = 1; @@ -144,6 +158,48 @@ #endregion + #region 闅愯棌鍒楄缃� 鍒犻櫎 + [Route("Xt_grdAlignment_WMES/DelgrdAlignmentWMES")] + [HttpGet] + public object DelgrdAlignmentWMES(string HModName, string user) + { + try + { + ds = oCN.RunProcReturn("select * from Xt_grdAlignment_WMES where HModName='" + HModName + "' and HUserName='" + user + "'", "Xt_grdAlignment_WMES"); + + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝や汉鏃犳ā鍧楁暟鎹�!"; + objJsonResult.data = null; + return objJsonResult; + } + + + oCN.BeginTran(); + + oCN.RunProc("delete from Xt_grdAlignment_WMES where HModName='" + HModName + "' and HUserName='" + user + "'"); + + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 鎸夐挳璁剧疆 鍒楄〃 [Route("Xt_ModuleButtonSet_WMES/moduleButtonSetWMESList")] -- Gitblit v1.9.1