From c14d65aa45f6fe0eedd558bc0de345a0ccd6e22a Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 25 五月 2023 16:43:41 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/博日自动扫码线/ScanlineAPIController.cs | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git "a/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs" "b/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs" index 04e17a1..520edd5 100644 --- "a/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs" +++ "b/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs" @@ -84,6 +84,7 @@ ds = oCN.RunProcReturn("Select HBarCode barcode,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType from Gy_BarCodeBill where HSourceBillNo='" + list.billno.ToString().Trim() + "' Order by HItemID ", "Gy_BarCodeBill"); if (ds == null || ds.Tables[0].Rows.Count == 0) { + LogService.Write("褰撳墠璁㈠崟鏃犵粦瀹氭潯鐮�"); objJsonResult.status = -1; objJsonResult.msg = "褰撳墠璁㈠崟鏃犵粦瀹氭潯鐮�!"; objJsonResult.data = null; @@ -95,6 +96,7 @@ if (strList.Count > 0) { string Str = String.Join(",", strList.ToArray()); + LogService.Write("鏉$爜:" + Str.ToString() + " 涓嶅寘鍚湪璁㈠崟:" + list.billno + "涓�!"); objJsonResult.status = -1; objJsonResult.msg = "鏉$爜:" + Str.ToString() + " 涓嶅寘鍚湪璁㈠崟:" + list.billno + "涓�!"; objJsonResult.data = null; @@ -106,14 +108,16 @@ bool IsBarCodePack = oBill.IsBarCodePack(list.packagebarcode); if (IsBarCodePack == false) { + LogService.Write($"绠辩爜:{list.packagebarcode}宸插瓨鍦�,涓嶈兘閲嶅缁戝畾锛�"); objJsonResult.status = -1; - objJsonResult.msg = "绠辩爜宸插瓨鍦�,涓嶈兘閲嶅缁戝畾锛�"; + objJsonResult.msg = $"绠辩爜:{list.packagebarcode}宸插瓨鍦�,涓嶈兘閲嶅缁戝畾锛�"; objJsonResult.data = null; return objJsonResult; } ds = oCN.RunProcReturn("Select * from Gy_BarCodeBill where HBarCode='" + list.packagebarcode.ToString().Trim() + "' and HStopflag='1'", "Gy_BarCodeBill"); if (ds != null && ds.Tables[0].Rows.Count > 0) { + LogService.Write("姝ょ鏉$爜宸蹭綔搴�"); objJsonResult.status = -1; objJsonResult.msg = "姝ょ鏉$爜宸蹭綔搴�"; objJsonResult.data = null; @@ -155,11 +159,12 @@ for (int i = 0; i < list.barcodes.Count; i++) { //鍒ゆ柇鏉$爜鏄惁瀛樺湪 - bool IsBarCode = oBill.IsBarCodePack(list.barcodes[i].barcode); - if (IsBarCodePack == false) + bool IsBarCode = oBill.IsBarCode(list.barcodes[i].barcode); + if (IsBarCode == false) { + DataTable dt = oCN.RunProcReturn("Select HBarCode_Pack from Sc_PackUnionBillSub Where HBarCode='" + list.barcodes[i].barcode + "'", "Sc_PackUnionBillSub").Tables[0]; objJsonResult.status = -1; - objJsonResult.msg = "鏉$爜宸插瓨鍦�,涓嶈兘閲嶅缁戝畾锛�"; + objJsonResult.msg = $"鏉$爜锛歿list.barcodes[i].barcode}锛屽凡瀛樺湪绠辩爜锛歿dt.Rows[0]["HBarCode_Pack"]}涓紝鏈缁戝畾绠辩爜涓猴細{list.packagebarcode},缁戝畾澶辫触,涓嶈兘閲嶅缁戝畾锛�"; objJsonResult.data = null; return objJsonResult; } @@ -200,14 +205,16 @@ } if (bResult) { + LogService.Write("鎻愪氦鎴愬姛绠辨潯鐮侊細" + list.packagebarcode); + Log.LogSaveInfo("鎻愪氦鎴愬姛绠辨潯鐮侊細" + list.packagebarcode); //璁板綍鎻愪氦鏁版嵁 objJsonResult.status = 0; objJsonResult.msg = "success"; objJsonResult.data = null; - Log.LogSaveInfo("鎻愪氦鎴愬姛绠辨潯鐮侊細" + list.packagebarcode); //璁板綍鎻愪氦鏁版嵁 return objJsonResult; } else { + LogService.Write("淇濆瓨澶辫触锛�" +DBUtility.ClsPub.sExeReturnInfo); objJsonResult.status = -1; objJsonResult.msg = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = null; @@ -216,6 +223,7 @@ } catch (Exception e) { + LogService.Write("绠辨潯鐮佺粦瀹氬叧绯绘彁浜ゆ帴鍙� 鎶涘嚭寮傚父" + e.Message.ToString()); objJsonResult.status = -1; objJsonResult.msg = e.Message; objJsonResult.data = null; -- Gitblit v1.9.1