From 63be464a9bfbfa9412fa7809612418c150eab478 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 24 十月 2025 13:36:15 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 164 +++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 141 insertions(+), 23 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index d47a47c..5cd910d 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -80,6 +80,63 @@
}
#endregion
+ #region 杩斿洖濮斿宸ュ簭鍙戝嚭鍗曞垪琛�
+ [Route("Cj_StationEntrustInBill/list_Eng")]
+ [HttpGet]
+ public object list_Eng(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("MES_StationEntrustInBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_MES_StationEntrustInBillList_Eng", "h_v_MES_StationEntrustInBillList_Eng");
+ // order by hmainid desc 鎺掑簭涓㈠埌鏁版嵁搴撻噷杩涜澶勭悊
+ }
+ else
+ {
+ string sql1 = "select * from h_v_MES_StationEntrustInBillList_Eng where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_MES_StationEntrustInBillList_Eng");
+ }
+
+ //娣诲姞鍒楀悕
+ 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 = 1;
+ 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("Cj_StationEntrustInBill/getStationEntrustInBillPage")]
[HttpGet]
@@ -200,7 +257,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "绌虹櫧鐮�,鏉″舰鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.Message = "[0000-2-019]绌虹櫧鐮�,鏉″舰鐮佷笉鑳戒负绌猴紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -240,6 +297,22 @@
{
ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList");
}
+ }
+ break;
+ case "OP"://娴佽浆鍗�
+ sErr = "";
+ if (oSystemParameter.ShowBill(ref sErr))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "娴疯瘹")
+ {
+ //鍚屾宸ュ簭娴佽浆鍗�
+ oCN.RunProc("exec h_p_IFCLD_ERPSourceBillToLocal_ProcExchAndRouting '" + BillNo_PGD + "'");
+ ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList");
+ }
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList");
}
break;
}
@@ -369,25 +442,25 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏈煡璇㈠埌鏉$爜淇℃伅锛�";
+ objJsonResult.Message = "[0000-2-020]鏈煡璇㈠埌鏉$爜淇℃伅锛�";
objJsonResult.data = null;
if(BillNoType == "PRO")
{
ds = oCN.RunProcReturn("select * from h_v_Gy_ProcessList where HItemID = '" + BillNo + "'", "h_v_Gy_ProcessList");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
- objJsonResult.Message = "鏈煡璇㈠埌鏉$爜淇℃伅锛�";
+ objJsonResult.Message = "[0000-2-020]鏈煡璇㈠埌鏉$爜淇℃伅锛�";
}
else
{
- objJsonResult.Message = "鐢ㄦ埛鏈叧鑱旂浉鍏冲伐搴忔垨娴佽浆鍗℃棤姝ゅ伐搴忥紝濡傛湁闇�瑕佽缁存姢";
+ objJsonResult.Message = "[3790-2-010]鐢ㄦ埛鏈叧鑱旂浉鍏冲伐搴忔垨娴佽浆鍗℃棤姝ゅ伐搴忥紝濡傛湁闇�瑕佽缁存姢";
}
}
return objJsonResult;
}
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -395,7 +468,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -458,7 +531,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "绌虹櫧鐮�,鏉″舰鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.Message = "[0000-2-019]绌虹櫧鐮�,鏉″舰鐮佷笉鑳戒负绌猴紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -472,7 +545,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏈煡璇㈠埌鏉″舰鐮佷俊鎭紒";
+ objJsonResult.Message = "[0000-2-020]鏈煡璇㈠埌鏉″舰鐮佷俊鎭紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -480,7 +553,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "閿欒锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
+ objJsonResult.Message = "[0000-1-038]閿欒锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
objJsonResult.data = null;
return objJsonResult;
}
@@ -493,7 +566,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒锋柊澶辫触,鏃犳暟鎹樉绀猴紒";
+ objJsonResult.Message = "[0000-1-045]鍒锋柊澶辫触,鏃犳暟鎹樉绀猴紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -501,14 +574,14 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏌ユ棤鏁版嵁!";
+ objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁!";
objJsonResult.data = null;
return objJsonResult;
}
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "缁戝畾鎴愬姛锛�";
+ objJsonResult.Message = "[0000-1-037]缁戝畾鎴愬姛锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -516,7 +589,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1678,7 +1751,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鐢ㄦ埛缂栫爜涓嶈兘涓虹┖锛�";
+ objJsonResult.Message = "[0000-2-021]鐢ㄦ埛缂栫爜涓嶈兘涓虹┖锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1689,13 +1762,13 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏈煡璇㈠埌宸ュ簭淇℃伅锛�";
+ objJsonResult.Message = "[0000-2-022]鏈煡璇㈠埌宸ュ簭淇℃伅锛�";
objJsonResult.data = null;
return objJsonResult;
}
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -1703,7 +1776,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1712,7 +1785,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鎵嬪姩杈撳叆妯″紡";
+ objJsonResult.Message = "[0000-2-024]鎵嬪姩杈撳叆妯″紡";
objJsonResult.data = "";
return objJsonResult;
}
@@ -1728,7 +1801,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鐢ㄦ埛缂栫爜涓嶈兘涓虹┖锛�";
+ objJsonResult.Message = "[0000-2-021]鐢ㄦ埛缂栫爜涓嶈兘涓虹┖锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1739,7 +1812,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏈煡璇㈠埌宸ュ簭淇℃伅锛�";
+ objJsonResult.Message = "[0000-2-022]鏈煡璇㈠埌宸ュ簭淇℃伅锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1753,7 +1826,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1762,7 +1835,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鎵嬪姩杈撳叆妯″紡";
+ objJsonResult.Message = "[0000-2-024]鎵嬪姩杈撳叆妯″紡";
objJsonResult.data = "";
return objJsonResult;
}
@@ -1776,7 +1849,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "绯荤粺鍙傛暟寮傚父";
+ objJsonResult.Message = "[0000-2-023]绯荤粺鍙傛暟寮傚父";
objJsonResult.data = "";
return objJsonResult;
}
@@ -2373,6 +2446,51 @@
}
#endregion
+ #region 濮斿宸ュ簭鍙戝嚭鍗曟祦姘村彿鍥炶溅鑾峰彇宸ュ簭淇℃伅(搴忓垪鍙�)
+ [Route("Cj_StationEntrustInBill/txtHProcNo_KeyDown_Sec")]
+ [HttpGet]
+ public object txtHProcNo_KeyDown_Sec(string sBillNo, string sProcNo, string HSEQNumber)
+ {
+ try
+ {
+ if (sBillNo.Equals("") || sProcNo.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //寰楀埌淇℃伅锛堝澶栨爣璁颁负0鏃讹紝娴佽浆鏍囪涓�1鏃讹級
+ ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList_Sec where 鍗曟嵁鍙�= '" + sBillNo + "' and 涓嬮亾娴佽浆宸ュ簭<>'杞�' and 濮斿鏍囪=1 and 娴佽浆鏍囪=1 and 宸ュ簭鍙�='" + sProcNo + "' and 搴忓垪鍙�='" + HSEQNumber + "'", "h_v_Sc_ProcessExchangeBillList_Sec");
+ //Ds = oCn.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + sBillNo + "' and 宸ュ簭鍙�='" + sProcNo + "' and 濮斿鏍囪=0 and 娴佽浆鏍囪=1 ", "h_v_Sc_ProcessExchangeBillList");
+ //鍐欏叆淇℃伅
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "宸ュ簭鍙烽敊璇垨鑰呭綋鍓嶅伐搴忓彿涓嶅厑璁歌繘绔欙紝璇烽噸鏂拌緭鍏ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ 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
+
#region 缂栬緫鍓嶅垽鏂�
[Route("Cj_StationEntrustInBill/set_ShowBillJudge")]
[HttpGet]
--
Gitblit v1.9.1