From 948d2bbf11ef06dab194332909098dc72e02c73b Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期五, 09 六月 2023 14:53:23 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
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