chenhaozhe
2026-01-26 6953c0394201ef74007978f334397ea30a32ec63
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -13834,15 +13834,22 @@
                if(Mode == 1)
                {
                    //扫码模式需要解析条码获取HInterID和HEntryID
                    LogService.Write($@"
                    exec h_p_CheckBillBarCode_AnalysisBarcode
                        @HBillType={HBillType},
                        @HSourceBillType={HSourceBillType},
                        @HBarCode='{HBarCode}',
                        @user = '{user}'
                    ");
                    ds = oCn.RunProcReturn($@"
                    exec h_p_CheckBillBarCode_AnalysisBarcode 
                        @HBillType={HBillType},
                        @HSourceBillType={HSourceBillType},
                        @HBarCode={HBarCode},
                        @HBarCode='{HBarCode}',
                        @user = '{user}'
                    ", "h_p_CheckBillBarCode_AnalysisBarcode");
                    if (ds.Tables[0].Rows.Count == 0)
                    if (ds is null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
@@ -13982,5 +13989,45 @@
            }
        }
        #endregion
        #region [取样单] èŽ·å–æœªä¸‹æŽ¨æˆæ£€éªŒå•çš„å–æ ·å•åˆ—è¡¨
        [Route("WEBSController/AwaitCheckSampleBillList")]
        [HttpGet]
        public Object AwaitCheckSampleBillList(string user)
        {
            List<object> columnNameList = new List<object>();
            try
            {
                ds = oCn.RunProcReturn($@"
                    exec h_p_AwaitCheckSampleBillList @user={user}
                ", "h_p_CheckBillBarCode_CheckItem");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "success!";
                objJsonResult.data = ds.Tables;
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "扫描单据条码失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}