From 6956b68704a297a7f7a5352063442d906e07f648 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 29 四月 2025 16:21:12 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs | 62 +++++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs b/WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs
index e1d9db7..67195a9 100644
--- a/WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs
@@ -554,5 +554,67 @@
}
#endregion
+ [Route("Sc_KeyElementBinding/UpdatePartsCode")]
+ [HttpGet]
+ /// <summary>
+ /// 鏇挎崲閰嶄欢鐮佺粦瀹�
+ /// </summary>
+ /// <param name=""></param>
+ /// <returns></returns>
+ public object UpdatePartsCode(string HInterID, string HEntryID, string HPartsCode,string HPartsOld,string HOrgID,string user)
+ {
+ try
+ {
+ if (HInterID == null || HInterID == "" || HInterID == "undefined" || HEntryID == null || HEntryID == "" || HEntryID == "undefined")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎿嶄綔澶辫触锛佷富鍐呯爜鎴栧瓙鍐呯爜涓虹┖";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ string sql = "exec h_p_Sc_KeyElementBinding_Change '" + HInterID + "','" + HEntryID + "','" + HPartsCode + "','" + HPartsOld + "','" + HOrgID + "','" + user + "'";
+
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_KeyElementBinding_Replace");
+
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = "";
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "";
+ objJsonResult.data = "娌℃湁杩斿洖鏁版嵁锛�" + sql;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
}
}
--
Gitblit v1.9.1