From 96762a572dd7d89969940d34f9cf4200716f5ff7 Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期四, 21 八月 2025 13:30:57 +0800 Subject: [PATCH] 海诚出站汇报单添加自动同步 --- WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 66 +++++++++++++++++++++++++++++--- 1 files changed, 59 insertions(+), 7 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs index 871a794..15adf94 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs @@ -522,7 +522,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "[0000-2-015]鏁伴噺鎺у埗," + ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.Message = ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); objJsonResult.data = null; return objJsonResult; } @@ -630,6 +630,15 @@ else { objJsonResult.Verify = "N"; + } + } + //鍒ゆ柇鏄惁鏄柊澧� + if ("Add".Equals(eventType)) + { + //鍒ゆ柇瀹㈡埛涓烘捣璇� 鍚屾閲戣澏宸ュ簭姹囨姤鍗� + if (oSystemParameter.omodel.WMS_CampanyName == "娴疯瘹") + { + object objResult = set_SaveStationOutBill_CLD_Json(HInterID, HBillNo, user); } } sw.Stop();//缁撴潫璁℃椂 @@ -2650,6 +2659,7 @@ [HttpGet] public object set_ShowBillJudge(string HBillNo) { + string sReturn = ""; try { ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_DelCtrl '" + HBillNo + "'", "h_p_MES_StationOutBill_DelCtrl"); @@ -2665,7 +2675,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "[0000-1-038]" + Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]); + objJsonResult.Message = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]); objJsonResult.data = null; return objJsonResult; } @@ -2680,11 +2690,34 @@ } catch (Exception e) { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); - objJsonResult.data = null; - return objJsonResult; + if (oSystemParameter.ShowBill(ref sReturn) == true) + { + if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") //绯荤粺鍙傛暟 鍒ゆ柇瀹㈡埛 + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + else + { + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } } } #endregion @@ -4335,6 +4368,25 @@ { try { + //鍚屾鍓嶆帶鍒�========================================= + ds = oCN.RunProcReturn("Exec h_p_Sc_StationOutBill_BeforeSyncCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HMaker + "'", " h_p_Sc_StationOutBill_BeforeSyncCtrl "); + if (ds == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "[0000-2-012]淇濆瓨鍓嶅垽鏂け璐ワ紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "[0000-1-051]鍚屾澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + //========================================================= if (oWebs.set_SaveStationOutBill_CLD(HInterID, HBillNo, HMaker, ref DBUtility.ClsPub.sErrInfo)) { objJsonResult.code = "0"; -- Gitblit v1.9.1