From 936a699c40a21840d491e4538790740f9c8ccb06 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 05 九月 2025 09:27:14 +0800
Subject: [PATCH] 其他入库单:增加字段 件数
---
WebAPI/Controllers/WebAPIController.cs | 265 ++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 202 insertions(+), 63 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 73e2772..d7924e6 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -21067,6 +21067,50 @@
/// <summary>
+ /// 鑾峰彇閫夊崟鍙风殑婧愬崟绫诲瀷 閫氳繃閫夊崟鍙峰崟鎹被鍨�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetHSourceBillTypeByBillType")]
+ [HttpGet]
+ public object GetHSourceBillTypeByBillType(string HBillType, int Num)
+ {
+ try
+ {
+ ClsCN oCn = new ClsCN();
+ DataSet oDs = new DataSet();
+ //鏈夌殑鍗曞瓙婧愬崟鍒嗕负绾㈣摑鍗� 0浠h〃钃濆崟 1浠h〃绾㈠崟
+ if (Num == 0)
+ { //婧愬崟涓鸿摑鍗�
+ oDs = oCn.RunProcReturn("select * from Xt_BillSourceSet where HNumber='" + HBillType + "'and HRedBlueFlag ='" + Num + "' ", "Xt_BillSourceSet");
+ }
+ else if (Num == 1)
+ { //婧愬崟涓虹孩鍗�
+ oDs = oCn.RunProcReturn("select * from Xt_BillSourceSet where HNumber='" + HBillType + "' and HRedBlueFlag ='" + Num + "' ", "Xt_BillSourceSet");
+ }
+ else if (Num == 2)
+ { //涓嶅垎绾㈣摑鍗�
+ oDs = oCn.RunProcReturn("select * from Xt_BillSourceSet where HNumber='" + HBillType + "'", "Xt_BillSourceSet");
+ }
+
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛锛�";
+ objjson.data = oDs.Tables[0];
+ return objjson; ;
+ }
+ catch (Exception e)
+ {
+
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触锛佸紓甯�" + e.ToString();
+ objjson.data = null;
+ return objjson; ;
+ }
+ }
+
+
+ /// <summary>
/// 鑾峰彇閫夊崟鍙风殑婧愬崟绫诲瀷
/// </summary>
/// <returns></returns>
@@ -21098,75 +21142,116 @@
}
#region [浠庢暟鎹簱鍔犺浇鑿滃崟 APP]
- //public class AppMenuLoad {
- // public string HitemID { get; set; } // 涓婚敭
- // public string HPartentID { get; set; } = "0"; // 鐖惰妭鐐笽D
- // public string HEntryID { get; set; } // 鑿滃崟鑺傜偣id
- // public string HIndex { get; set; }
- // public string HName { get; set; }
- // public string HMenuName { get; set; }
- // public string HPicNum { get; set; }
- // public string HShowMode { get; set; }
- // public string HTranslationText_English { get; set; }
- // public string HTranslationText_Spain { get; set; }
- // public string HMaker { get; set; }
- // public List<MenuLoad> childMenus { get; set; }
- //}
- //[Route("Web/MenuList_APP")]
- //[HttpGet]
- //public object MenuList_APP()
- //{
- // return null;
- //}
+ public class AppMenuLoad
+ {
+ public string HitemID { get; set; } // 涓婚敭
+ public string HPartentID { get; set; } = "0"; // 鐖惰妭鐐笽D
+ public string HEntryID { get; set; } // 鑿滃崟鑺傜偣id
+ public string HIndex { get; set; }
+ public string HName { get; set; }
+ public string HMenuName { get; set; }
+ public string HPicNum { get; set; }
+ public string HShowMode { get; set; }
+ public string HTranslationText_English { get; set; }
+ public string HTranslationText_Spain { get; set; }
+ public string HMaker { get; set; }
+ public List<MenuLoad> childMenus { get; set; }
+ }
+ [Route("Web/MenuList_APP")]
+ [HttpGet]
+ public object MenuList_APP(string HMaker, string HType, string HMenuListName)
+ {
+ try
+ {
+ DataSet ds = oCN.RunProcReturn("exec [h_p_Gy_MenuDefineSet_APP_Get] " +
+ "@HMaker = N'" + HMaker + "'," +
+ "@HType = N'" + HType + "'," +
+ "@HMenuListName = N'" + HMenuListName + "'"
+ , "h_p_Gy_MenuDefineSet_APP_Get");
- //[Route("Web/SetMenuList_APP")]
- //[HttpPost]
- //public object SetMenuList_APP([FromBody] JObject oMain)
- //{
- // var _value = oMain["oMain"].ToString();
- // string msg1 = _value.ToString();
- // string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
- // try
- // {
- // string msg2 = sArray[0];
- // string user = sArray[1].ToString();
- // string MenuName = sArray[2].ToString();
- // string type = sArray[3].ToString();
+ if ((bool)ds.Tables[0].Rows[0]["returnType"] == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = ds.Tables[0].Rows[0]["mesg"].ToString();
+ objJsonResult.data = ds.Tables[1];
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = ds.Tables[0].Rows[0]["mesg"].ToString();
+ return objJsonResult;
+ }
- // if(String.Equals(type, "APP", StringComparison.InvariantCultureIgnoreCase))
- // {
- // List<AppMenuLoad> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<AppMenuLoad>>(msg2);
- // string sql2 = "";
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
- // foreach (AppMenuLoad one in list)
- // {
- // StringBuilder sqlFragment = new StringBuilder();
- // sqlFragment.Append("insert into Gy_MenuDefineSet(");
- // var oneType = one.GetType();
- // }
+ }
+ [Route("Web/SetMenuList_APP")]
+ [HttpPost]
+ public object SetMenuList_APP([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ try
+ {
+ string msg2 = sArray[0];
+ string user = sArray[1].ToString();
+ string MenuName = sArray[2].ToString();
+ string type = sArray[3].ToString();
- // return null;
- // }
- // else
- // {
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏆備笉鏀寔璇ュ钩鍙拌缃嚜瀹氫箟鑿滃崟锛�";
- // objJsonResult.data = null;
- // return objJsonResult;
- // }
+ if (String.Equals(type, "APP", StringComparison.InvariantCultureIgnoreCase))
+ {
+ oCN.BeginTran();
+ List<AppMenuLoad> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<AppMenuLoad>>(msg2);
+ string sql1 = "delete from Gy_MenuDefineSet_APP where HMenuName = '" + MenuName + "' and HMaker = '" + user + "'";
+ oCN.RunProcReturn(sql1, "Gy_MenuDefineSet_APP");
+ list.ForEach(one =>
+ {
+ string sql2 = "insert into Gy_MenuDefineSet_APP( HEntryID, HIndex, HName, HMenuName, HPicNum, HShowMode, HMaker)" +
+ "Values('" + one.HEntryID + "','" + one.HIndex + "','" + one.HName + "','" + MenuName + "','"
+ + one.HPicNum + "','" + one.HShowMode + "','" + user + "')";
+ oCN.RunProcReturn(sql2, "Gy_MenuDefineSet_APP");
+ });
- // }
- // catch(Exception e)
- // {
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = e.ToString();
- // objJsonResult.data = null;
- // return objJsonResult;
- // }
- //}
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "璁剧疆鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ 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
@@ -22133,6 +22218,59 @@
}
}
+ /// <summary>
+ /// 閫氳繃鍗曟嵁绫诲瀷鑾峰彇瀵瑰簲瑙嗗浘骞堕�氳繃鍗曟嵁鍙锋煡璇㈠崟鎹俊鎭�
+ /// </summary>
+ /// <param name="HBillNo"></param>
+ /// <param name="HBillType"></param>
+ /// <param name="HStoreOrgID"></param>
+ /// <returns></returns>
+ [Route("Web/GetBillInfo")]
+ [HttpGet]
+ public object GetBillInfo(string HBillNo, string HBillType, int HStockOrgID)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ ds = oCN.RunProcReturn("exec h_p_Gy_GetBillInfoByHBillTypeAndHBillNo N'" + HBillType + "',N'" + HBillNo +
+ "'," + HStockOrgID, "h_p_Gy_GetBillInfoByHBillTypeAndHBillNo");
+
+ if (ds == null)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else if((bool)ds.Tables[1].Rows[0]["returnType"] == false)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ds.Tables[1].Rows[1]["payload"];
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
+
/// <summary>
/// 閲戝竻WMS鎺ュ彛
@@ -22194,6 +22332,7 @@
}
}
+
}
}
--
Gitblit v1.9.1