From 9f7b0ecace9c80ff2a1d95f4343058b3b031bd22 Mon Sep 17 00:00:00 2001
From: dytyqx <1342948614@qq.com>
Date: 星期一, 30 三月 2026 21:39:29 +0800
Subject: [PATCH] 容器管理新增字段子单据类型
---
WebAPI/Controllers/LMESController.cs | 102 ++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 92 insertions(+), 10 deletions(-)
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 3e4e02e..3ea3d32 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -872,25 +872,39 @@
{
continue;
}
- string sReturn = "";
- if (oSystemParameter.ShowBill(ref sReturn) == true)
+ //淇濆瓨鍓嶅垽鏂祦杞崱鍚屼竴涓伐搴忔淳宸ユ槸鍚︽帓浜嗕袱娆�
+ string SQ = "select * from Sc_ICMOBillStatus_Tmp where HSourceInterID=" + hSourceInterID + " and HSourceEntryID=" + hSourceEntryID + " and HSourceID=" + hSourceID + " and HMouldID=" + hMoldID + "";
+ ds2 = oCN.RunProcReturn(SQ, "Sc_ICMOBillStatus_Tmp");
+ if (ds2.Tables[0].Rows.Count > 0)
{
- if (oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷")
- {
- oCN.RunProc("update Sc_ProcessExchangeBillMain set HMakeDate = GETDATE(),HRemark3='宸叉淳宸�',HMaker='" + msg4 + "' where HInterID = " + hSourceInterID);
- LogService.Write("鑷姩鐢熸垚宸ヤ綔鑱旂郴鍗�...");
-
- //鑷姩鐢熸垚宸ヤ綔鑱旂郴鍗�
- ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + hSourceInterID + "," + 3772, "h_p_OA_WorkLinkBill_Create");
- }
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍚屼竴宸ュ崟涓嶈兘鍐嶇浉鍚屼骇绾跨浉鍚屾ā鍏蜂笂閲嶅娲惧伐锛�";
+ return objJsonResult;
}
+ //鏇存柊娴佽浆鍗″瓙琛ㄧ敓浜ц祫婧�
oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=" + hSourceID + " where HInterID=" + hSourceInterID + " and HEntryID=" + hSourceEntryID);
// 鎻掑叆鐢熶骇鐘舵�佷复鏃惰〃
string SQL = $"exec h_p_Sc_ICMOBillStatus_Tmp_PGPL {hSourceInterID},{hSourceEntryID},{hSourceID},{hMoldID}";
oCN.RunProc(SQL);
//鎻掑叆宸ュ簭娴佽浆鍗℃淳宸ュ崟
string SQL1 = $"exec h_p_Sc_ProcExchSendWorkBill_PG {hSourceInterID},{hSourceEntryID},{hSourceID},{hMoldID}";
+
oCN.RunProc(SQL1);
+ string sReturn = "";
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷")
+ {
+ oCN.RunProc("update Sc_ProcessExchangeBillMain set HMakeDate = GETDATE(),HRemark3='宸叉淳宸�',HMaker='" + msg4 + "' where HInterID = " + hSourceInterID);
+
+ LogService.Write("娲惧伐鑷姩鐢熸垚宸ヤ綔鑱旂郴鍗�..."+ hSourceInterID);
+ //鑷姩鐢熸垚宸ヤ綔鑱旂郴鍗�
+ ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + hSourceInterID + "," + 3772, "h_p_OA_WorkLinkBill_Create");
+ }
+ }
+
// 7. 鎻愪氦浜嬪姟
oCN.Commit();
@@ -2248,6 +2262,74 @@
return GetObjectJson(ds);
}
+ /// <summary>
+ /// 杩斿洖宸ュ簭娴佽浆鍗″垪琛�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("LEMS/MES_Sc_ProcessExchangeBillList_Json")]
+ [HttpGet]
+ public object MES_Sc_ProcessExchangeBillList_Json(string sWhere, string user)
+ {
+ DataSet ds;
+ try
+ {
+ List<object> columnNameList = new List<object>()
+; //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBillQuery", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+ if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
+ {
+ //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
+ string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "鐢熶骇璁㈠崟鍒楄〃");
+
+ sWhere += sql_splice;
+ }
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere + " order by 鍒跺崟鏃ユ湡 desc,鍗曟嵁鍙� desc", "h_v_Sc_ProcessExchangeBillQuery");
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ //{
+ //objJsonResult.code = "1";
+ //objJsonResult.count = 1;
+ //objJsonResult.Message = "Sucess锛�";
+ //objJsonResult.data = ds.Tables[0];
+ //objJsonResult.list = a;
+ //return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ return GetObjectJson(ds);
+ }
+
+
+
#region 鐢熶骇璁㈠崟鍒楄〃-鍒嗛〉
[Route("LEMS/MES_IF_ICMOBillList_Json_byPage")]
--
Gitblit v1.9.1