From c6cef8f7a94d1c2051e7d594167e6177a8c18fc2 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期三, 29 十二月 2021 23:55:43 +0800 Subject: [PATCH] 博日扫码线 --- WebAPI/Controllers/博日自动扫码线/ScanlineAPIController.cs | 33 +++++++++++++++++++++++++++++---- 1 files changed, 29 insertions(+), 4 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 705ef1a..0e1a8c2 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" @@ -108,6 +108,14 @@ 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) + { + objJsonResult.status = -1; + objJsonResult.msg = "姝ょ鏉$爜宸蹭綔搴�"; + objJsonResult.data = null; + return objJsonResult; + } Models.ClsSc_PackUnionBillMain oItem = new ClsSc_PackUnionBillMain(); oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); @@ -120,7 +128,7 @@ oItem.HCheckItemNowID = 0; oItem.HCheckItemNextID = 0; oItem.HCheckFlowID = 0; - oItem.HRemark = "鑷姩鍖呰绾跨敓杈扮鏉$爜"; + oItem.HRemark = "鑷姩鍖呰绾跨敓鎴愮鏉$爜"; oItem.HBacker = ""; oItem.HBackDate = ""; oItem.HMaker = ""; @@ -219,14 +227,31 @@ { try { + ds = oCN.RunProcReturn("Select * from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "'", "Gy_BarCodeBill"); + if (ds == null && ds.Tables[0].Rows.Count == 0) + { + objJsonResult.status = -1; + objJsonResult.msg = "鏃犳晥绠辨潯鐮�"; + objJsonResult.data = null; + return objJsonResult; + } + ds = oCN.RunProcReturn("Select * from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "' and HStopflag='1'", "Gy_BarCodeBill"); + if (ds != null && ds.Tables[0].Rows.Count>0) + { + objJsonResult.status = -1; + objJsonResult.msg = "姝ょ鏉$爜宸蹭綔搴�"; + objJsonResult.data = null; + return objJsonResult; + } + // oCN.BeginTran(); //鍒犻櫎瀛愯〃 - oCN.RunProc("Delete From Sc_PackUnionBillSub where HBarCode_Pack=" + packagebarcode.ToString()); + oCN.RunProc("Delete From Sc_PackUnionBillSub where HBarCode_Pack='"+ packagebarcode.ToString() + "'"); //鍒犻櫎涓昏〃 - oCN.RunProc("Delete From Sc_PackUnionBillMain where HBarCode_Pack=" + packagebarcode.ToString()); + oCN.RunProc("Delete From Sc_PackUnionBillMain where HBarCode_Pack='" + packagebarcode.ToString() + "'"); //浣滃簾鏉$爜妗f琛� - oCN.RunProc("Update Gy_BarCodeBill set HStopflag='1' where HBarCode=" + packagebarcode.ToString()); + oCN.RunProc("Update Gy_BarCodeBill set HStopflag='1' where HBarCode='"+ packagebarcode .ToString()+ "'"); oCN.Commit(); -- Gitblit v1.9.1