From fd56fa51fe25f26ce5b518c6f3afb81fbc19553a Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期一, 25 七月 2022 17:04:53 +0800
Subject: [PATCH] 盘点
---
WebAPI/Controllers/WebAPIController.cs | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 167 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 8cdcc7a..241d16b 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -79,6 +79,116 @@
return objjson;
}
}
+
+ [Route("Web/GetMAXNumPDA")]
+ [HttpGet]
+ public object GetMAXNumPDA(string HBillType)
+ {
+ try
+ {
+ string HBillNo = "";
+ string sErrMsg = "";
+ Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
+ HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg);
+ HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
+
+ DataSet ds;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("exec h_p_IF_CheckBillIDExists_WMS " + HInterID + ",'" + HBillNo + "'", "h_p_IF_CheckBillIDExists_WMS");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ sErrMsg = "瀛樺湪閲嶅鍗曟嵁鍐呯爜鎴栧崟鎹彿鐨勫崟鎹紝涓嶅厑璁告柊澧烇紝璇烽��鍑哄悗閲嶆柊鐧诲綍锛�";
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = sErrMsg;
+ objjson.data = null;
+ return objjson;
+ }
+ else if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0][0]) == "1")
+ {
+ sErrMsg = "瀛樺湪閲嶅鍗曟嵁鍐呯爜鎴栧崟鎹彿鐨勫崟鎹紝涓嶅厑璁告柊澧烇紝璇烽��鍑哄悗閲嶆柊鐧诲綍锛�";
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = sErrMsg;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ //----------鍒涘缓铏氳〃------------------------
+ DataTable dt_Main = new DataTable("Json");
+ dt_Main.Columns.Add("HBillNo", typeof(string));
+ dt_Main.Columns.Add("HInterID", typeof(int));
+ //---------鍒涘缓鏂拌------------------------
+ DataRow dr_main = dt_Main.NewRow();//鍒涘缓鏂拌
+ dt_Main.Rows.Add(dr_main);//灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
+ dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
+ dr_main["HInterID"] = DBUtility.ClsPub.isLong(HInterID);
+ //杩斿洖鏁版嵁
+ objjson.code = "0";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛";
+ objjson.data = dt_Main;
+ return objjson;
+ }
+ }
+ catch (Exception e)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + e.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
+
+
+ //[Route("Web/Get_MaxBillNoAndID")]
+ //[HttpGet]
+ //public object Get_MaxBillNoAndID(string HBillType)
+ //{
+ // try
+ // {
+ // string HBillNo = "";
+ // Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
+ // HInterID = DBUtility.ClsPub.CreateBillID(HBillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ // HBillNo = DBUtility.ClsPub.CreateBillCode(HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+ // //----------鍒涘缓铏氳〃------------------------
+ // DataTable dt_Main = new DataTable("Json");
+ // dt_Main.Columns.Add("HBillNo", typeof(string));
+ // dt_Main.Columns.Add("HInterID", typeof(int));
+ // //---------鍒涘缓鏂拌------------------------
+ // DataRow dr_main = dt_Main.NewRow();//鍒涘缓鏂拌
+ // dt_Main.Rows.Add(dr_main);//灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
+ // dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
+ // dr_main["HInterID"] = DBUtility.ClsPub.isLong(HInterID);
+
+ // if (HBillNo == null || HInterID == 0)
+ // {
+ // objjson.code = "0";
+ // objjson.count = 0;
+ // objjson.Message = "鑾峰彇澶辫触";
+ // objjson.data = null;
+ // return objjson;
+ // }
+ // else
+ // {
+ // objjson.code = "0";
+ // objjson.count = 1;
+ // objjson.Message = "鑾峰彇鎴愬姛";
+ // objjson.data = dt_Main;
+ // return objjson;
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // objjson.code = "0";
+ // objjson.count = 0;
+ // objjson.Message = "鑾峰彇澶辫触" + e.ToString();
+ // objjson.data = null;
+ // return objjson;
+ // }
+ //}
/// <summary>
/// 鐧诲綍
/// </summary>
@@ -913,7 +1023,8 @@
}
try
{
- ds = webserver.GetEmployeeList(sWhere, ref DBUtility.ClsPub.sErrInfo);
+ string sql = $"Select * from h_v_IF_Emp {sWhere} Order by HNumber";
+ ds = oCN.RunProcReturn(sql, "h_v_IF_Emp");
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objjson.code = "0";
@@ -3371,7 +3482,62 @@
}
+ #region PDA鍏朵粬鍏ュ簱鍒楄〃妯″潡
+ /// <summary>
+ /// 鍏朵粬鍏ュ簱缂撳瓨鍒楄〃鍒锋柊淇℃伅
+ /// </summary>
+ /// <param name="HBillType"></param>
+ /// <param name="sHMaker"></param>
+ /// <param name="HOrgID"></param>
+ /// <returns></returns>
+ [Route("Web/GetOtherInBillMain_TempList_New")]
+ [HttpGet]
+ public object GetOtherInBillMain_TempList_New (string HBillType, string sHMaker, Int64 HOrgID)
+ {
+ WebS.WebService1 oWebs = new WebS.WebService1();
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ DataSet ds = oCN.RunProcReturn("exec h_p_KF_GetPonderationBillMain_TempList_New1 '" + HBillType + "','" + sHMaker + "'," + HOrgID.ToString(), "h_p_KF_GetPonderationBillMain_TempList_New1");
+
+ //娣诲姞鍒楀悕
+ 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 == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = 0;
+ return objJsonResult;
+ //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
--
Gitblit v1.9.1