From 29b9f853dcfb14e0157050a48e8c2d110cbf3022 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 09 三月 2023 19:55:25 +0800
Subject: [PATCH] 客户_收货方联系人
---
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 199 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 196 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index c3752c1..ade9d19 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -120,7 +120,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏈煡璇㈠埌娴佽浆鍗′俊鎭紒";
+ objJsonResult.Message = "鏈煡璇㈠埌娴佹按鍙蜂俊鎭紒宸ュ簭鍙烽敊璇垨鑰呭綋鍓嶅伐搴忓彿涓嶅厑璁歌繘绔欙紝璇锋坊鍔狅紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -138,6 +138,197 @@
objJsonResult.data = null;
return objJsonResult;
}
+ }
+ #endregion
+
+ #region 濮斿宸ュ簭鍙戝嚭鍗曟祦姘村彿鍥炶溅鑾峰彇鏉$爜淇℃伅2锛堝澶栧伐搴忔帴鏀躲�佸伐搴忚繘绔欐帴鏀堕�氱敤锛�
+ [Route("Cj_StationBill/txtHBarCode_KeyDown2")]
+ [HttpGet]
+ public object txtHBarCode_KeyDown2(string HBarCode,string HInterID,string UserID)
+ {
+ try
+ {
+ if (HBarCode == null || HBarCode.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绌虹櫧鐮�,鏉″舰鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鎷嗗垎鏉″舰鐮�
+ string sBillBarCode = HBarCode.Trim();
+ string[] NewBarCode;
+ if (sBillBarCode.CompareTo("#") > 0)
+ {
+ NewBarCode = sBillBarCode.Split(Convert.ToChar("#"));
+ sBillBarCode = NewBarCode[0];
+ }
+ string sBillNo = sBillBarCode;
+ //鎴彇鏉$爜绫诲瀷
+ string BillNoType = sBillNo.Substring(0, Math.Min(3, sBillNo.Length));
+ //鎴彇鍐呯爜
+ string BillNo = sBillNo.Substring(3, Math.Min(sBillNo.Length - 3,sBillNo.Length));
+
+ switch (BillNoType)
+ //寰楀埌淇℃伅
+ {
+ case "HCX"://鐢熶骇璧勬簮鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_SourceList where 鏉$爜缂栧彿 = '" + BillNo + "'", "h_v_Gy_SourceList");
+ break;
+ case "SBM"://璁惧鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_EquipMentList where HItemID = '" + BillNo + "'", "h_v_Gy_EquipMentList");
+ break;
+ case "JYM"://鍛樺伐鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_StaffList where HItemID = '" + BillNo + "'", "h_v_Gy_StaffList");
+ break;
+ case "GRM"://鍛樺伐鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_StaffList where HItemID = '" + BillNo + "'", "h_v_Gy_StaffList");
+ break;
+ case "CGM"://鍛樺伐鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_StaffList where HItemID = '" + BillNo + "'", "h_v_Gy_StaffList");
+ break;
+ case "HWH"://浠撳簱鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_WareHouseList where 鏉$爜缂栧彿 = '" + HBarCode + "'", "h_v_Gy_WareHouseList");
+ break;
+ case "HSP"://浠撲綅鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_StockPlaceList where 鏉$爜缂栧彿 = '" + HBarCode + "'", "h_v_Gy_StockPlaceList");
+ break;
+ case "WKM"://宸ヤ綔涓績鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_WorkCenterList where HItemID = '" + BillNo + "'", "h_v_Gy_WorkCenterList");
+ break;
+ case "BZM"://鐝粍鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_GroupList where 鏉$爜缂栧彿 = '" + BillNo + "'", "h_v_Gy_GroupList");
+ break;
+ case "PRO"://宸ュ簭鐮�
+ string sReturn = "";
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ //绯荤粺鍙傛暟鏄惁涓哄彧鏄剧ず褰撳墠鐧诲綍鐢ㄦ埛鍏宠仈鐨勫伐搴忎俊鎭�,N涓哄惁锛孻涓烘槸
+ if (oSystemParameter.omodel.MES_StationBill_ProcNoByUser == "Y")
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Gy_ProcessList_GetProcNoByUser where HItemID = '" + BillNo + "' and HInterID = '" + HInterID + "' and 鐢ㄦ埛缂栫爜 = '" + UserID + "'", "h_v_Gy_ProcessList_GetProcNoByUser");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Gy_ProcessList_GetProcNo where HItemID = '" + BillNo + "' and HInterID = '" +
+ HInterID + "'", "h_v_Gy_ProcessList_GetProcNo");
+ }
+ }
+ break;
+ case "WLM"://鐗╂枡鐮�
+ ds = oCN.RunProcReturn("select * from h_v_Gy_MaterialList where HItemID = '" + BillNo + "'", "h_v_Gy_MaterialList");
+ break;
+ case "GXL"://娴佽浆鍗�
+ ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + sBillNo + "'", "h_v_Sc_ProcessExchangeBillList");
+ break;
+ }
+
+ //鍐欏叆淇℃伅
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌鏉$爜淇℃伅锛�";
+ 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 = "鏈煡璇㈠埌鏉$爜淇℃伅锛�";
+ }
+ else
+ {
+ objJsonResult.Message = "鐢ㄦ埛鏈叧鑱旂浉鍏冲伐搴忔垨娴佽浆鍗℃棤姝ゅ伐搴忥紝濡傛湁闇�瑕佽缁存姢";
+ }
+ }
+ 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("Sc_StationInBill/autoGetProcNo")]
+ [HttpGet]
+ public object autoGetProcNo(string HUserID, string HInterID)
+ {
+ string sReturn = "";
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ //绯荤粺鍙傛暟鏄惁涓鸿嚜鍔ㄥ尮閰嶆祦姘村彿,N涓烘墜鍔ㄨ緭鍏ワ紝Y涓鸿嚜鍔ㄥ尮閰�
+ if (oSystemParameter.omodel.MES_StationBill_ProcNo == "Y")
+ {
+ try
+ {
+ if (HUserID == null || HUserID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鐢ㄦ埛缂栫爜涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //寰楀埌淇℃伅
+ ds = oCN.RunProcReturn("select * from h_v_Sc_StationBill_autoGetProcNo where HInterID = '" + HInterID + "' and 鐢ㄦ埛缂栫爜 ='" + HUserID + "'", "h_v_Sc_StationBill_autoGetProcNo");
+ //鍐欏叆淇℃伅
+ 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;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵嬪姩杈撳叆妯″紡";
+ objJsonResult.data = "";
+ return objJsonResult;
+ }
+
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绯荤粺鍙傛暟寮傚父";
+ objJsonResult.data = "";
+ return objJsonResult;
+ }
+
+
}
#endregion
@@ -212,7 +403,8 @@
return objJsonResult;
}
- List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg2);
+ List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg2);
+ DBUtility.ClsPub.CurUserName = user;
long HMainInterID = 0;
HMainInterID = list[0].HMainInterID;
string eventType = list[0].eventType;
@@ -375,6 +567,7 @@
",HTaxRate=" + HTaxRate +
",HMaterID=" + HMaterID +
",HProcID=" + HProcID +
+ ",HEmpID=" + HEmpID +
",HProcNo=" + HProcNo +
",HOrderProcNO='" + HOrderProcNO + "'" +
" where HInterID=" + HInterID);
@@ -433,7 +626,7 @@
}
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
+ objJsonResult.Message = "鎿嶄綔鍗曟嵁鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
--
Gitblit v1.9.1