From 579d2b489f9565f6e506ddbef634d65aa20dc27e Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期四, 12 六月 2025 14:03:28 +0800
Subject: [PATCH] 解决合并冲突
---
WebAPI/Controllers/生产管理/客户标签/Sc_CustomerTagController.cs | 219 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 219 insertions(+), 0 deletions(-)
diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\242\346\210\267\346\240\207\347\255\276/Sc_CustomerTagController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\242\346\210\267\346\240\207\347\255\276/Sc_CustomerTagController.cs"
index 28f39b5..fab6ee2 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\242\346\210\267\346\240\207\347\255\276/Sc_CustomerTagController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\242\346\210\267\346\240\207\347\255\276/Sc_CustomerTagController.cs"
@@ -622,6 +622,69 @@
}
#endregion
+ #region [瀹㈡埛鏍囩淇℃伅鍒犻櫎鍔熻兘]
+ [Route("Sc_CustomerTagInfo/Delete")]
+ [HttpGet]
+ public object Delete(string HItemSubIDs, string user)
+ {
+ try
+ {
+ DataSet Ds;
+ DataSet Ds2;
+
+ if (HItemSubIDs == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-009]閫夋嫨瀹㈡埛鏍囩淇℃伅涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Ds = oCN.RunProcReturn("Select * from h_v_Sc_CustomerTagInfoList with(nolock) Where HItemSubID in (" + HItemSubIDs + ")", "h_v_Sc_CustomerTagInfoList");
+ if (Ds.Tables[0].Rows.Count != 0)
+ {
+ oCN.BeginTran();
+
+ //鍒犻櫎瀹㈡埛鏍囩淇℃伅--瀛愯〃
+ oCN.RunProc("Delete from Sc_CustomerTagInfoSub Where HItemSubID in (" + HItemSubIDs + ")");
+
+ //鍐欏叆绯荤粺鏃ュ織
+ for (int i = 0; i < Ds.Tables[0].Rows.Count; i++)
+ {
+ oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','','" + "Sc_CustomerTagInfoList鈥斺�擠elete" + "','LMES-瀹㈡埛鏍囩淇℃伅妯″潡','" + DBUtility.ClsPub.IPAddress + "','" + user + "鍒犻櫎瀹㈡埛鏍囩淇℃伅," + "瀹㈡埛鍚嶇О锛�" + Ds.Tables[0].Rows[i]["瀹㈡埛鍚嶇О"] + ",鐗╂枡浠g爜锛�" + Ds.Tables[0].Rows[i]["鐗╂枡浠g爜"] + ",鍗曟嵁鍙凤細" + Ds.Tables[0].Rows[i]["鍗曟嵁鍙�"] + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "[0000-1-008]鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-045]鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-007]" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
#region 瀹㈡埛鏍囩妗f鐢熸垚
[Route("Sc_CustomerTagBarCode/Save")]
[HttpGet]
@@ -672,5 +735,161 @@
}
#endregion
+ #region 瀹㈡埛鏍囩鏉$爜 鏌ヨ-鍒嗛〉
+ [Route("Sc_CustomerTagBarCode/BarPageList")]
+ [HttpGet]
+ public object BarPageList(string sWhere, string user, string Organization, int page, int size)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>(); //瀹氫箟澹版槑鍙橀噺 锛屾妸閫氳繃 new List<object>()鍒涘缓鐨� 瀹炰緥锛岃祴鍊肩粰鍙橀噺
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_CustomerTagBarCodeList " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_Sc_CustomerTagBarCodeList");
+ }
+ else
+ {
+ sWhere = sWhere.Replace("'", "''");
+ ds = oCN.RunProcReturn("exec h_p_Sc_CustomerTagBarCodeList " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_Sc_CustomerTagBarCodeList");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region [瀹㈡埛鏍囩鏉$爜鍒犻櫎鍔熻兘]
+ [Route("Sc_CustomerTagBarCode/DeleteBarCode")]
+ [HttpGet]
+ public object DeleteBarCode(string HItemIDs,string user)
+ {
+ try
+ {
+ DataSet Ds;
+
+ if (HItemIDs == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-009]閫夋嫨鏉$爜涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Ds = oCN.RunProcReturn("Select * from h_v_Sc_CustomerTagBarCodeList with(nolock) Where HItemID in (" + HItemIDs + ")", "h_v_Sc_CustomerTagBarCodeList");
+ if (Ds.Tables[0].Rows.Count != 0)
+ {
+ oCN.BeginTran();
+
+ //鍒犻櫎瀹㈡埛鏍囩鏉$爜
+ oCN.RunProc("Delete from Sc_CustomerTagBarCode Where HItemID in (" + HItemIDs + ")");
+
+ //鍐欏叆绯荤粺鏃ュ織
+ for (int i = 0; i < Ds.Tables[0].Rows.Count; i++)
+ {
+ oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','','" + "Sc_CustomerTagBarCodeList鈥斺�擠elete" + "','LMES-瀹㈡埛鏍囩鏉$爜妯″潡','" + DBUtility.ClsPub.IPAddress + "','" + user + "鍒犻櫎瀹㈡埛鏍囩鏉$爜," + "鐢熶骇璁㈠崟锛�" + Ds.Tables[0].Rows[i]["鐢熶骇璁㈠崟鍙�"] + ",鐗╂枡浠g爜锛�" + Ds.Tables[0].Rows[i]["鐗╂枡浠g爜"] + ",娴佹按鍙凤細" + Ds.Tables[0].Rows[i]["娴佹按鍙�"] + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "[0000-1-008]鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-045]鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-007]" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 瀹㈡埛鏍囩妗f閲嶆柊鐢熸垚
+ [Route("Sc_CustomerTagBarCode/ReSave")]
+ [HttpGet]
+ public object BarCodeReSave(string HICMOInterID, string HICMOEntryID, string HSerialNum)
+ {
+ try
+ {
+
+ if (HICMOInterID == null || HICMOInterID.Equals("") || HICMOEntryID == null || HICMOEntryID.Equals("") || HSerialNum == null || HSerialNum.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璁㈠崟淇℃伅涓嶅叏锛丠ICMOInterID锛�" + HICMOInterID + ",HICMOEntryID:" + HICMOEntryID + ",HSerialNum:" + HSerialNum;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_CustomerTagBarCode_AutoReSave " + HICMOInterID + "," + HICMOEntryID + "," + HSerialNum, "h_p_Sc_CustomerTagBarCode_AutoReSave");
+ }
+
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
}
}
--
Gitblit v1.9.1