1
王 垚
2022-12-14 192df9e5b55cde1c11e21e050657dc94002a4612
WebAPI/Controllers/POStockInBillController.cs
@@ -2345,7 +2345,7 @@
                string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo);//客户名称
                string sql = string.Empty;
                if (FCusName.Contains("安瑞"))
                    sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from  Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode}' and HBarCodeType ='箱号内条码'";
                    sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from  Gy_BarCodeBill where HSourceInterID =(select distinct HSourceInterID from Cg_POInStockBillSub where HInterID ={HInterID}) and HBarCode = '{HBarcode}' and HBarCodeType ='箱号内条码'";
                else
                    sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from  Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}";
                DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList");