yxj
2024-12-26 d1b1370f65f785928675e206db6026a5ee162593
CLOUDWEB/WebService1.asmx.cs
@@ -56123,6 +56123,375 @@
        #endregion
        #region 扫描物料条码(条码类型 = "托盘条码")    *校验模式
        //扫描物料条码  存入条码出入库临时表
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_SavePonderationBillMain_Temp_PackBarCode_BillCheck(Model.ClsGy_BarCodeBill_WMS_Model_View omodel_View, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HStockOrgID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
            string sWHSPCtl = "Y";                //校验-是否校对仓库仓位('Y'为校对)
            string sMultilineCtl = "N";           //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
            string sMustQtyCtl = "完全等于应收";  //校验数量控制(小于等于应收、完全等于应收、不控制)
            string sOneScanCtl = "N";             //一次扫码控制('Y'为控制)
            string sFIFOCtl = "N";                //是否启用先进先出控制('Y'为是)
            string sWMSStockCtl = oSystemParameterMain.WMS_WMSStockCtl.ToUpper();   //是否启用库存控制-WMS负库存控制('Y'为是)
            string sWMS_CloudMode = oSystemParameterMain.WMS_CloudMode.ToUpper();   //是否为私有云模式('Y'为私有云模式)
            #region 系统参数获取
            //采购入库单
            if (HBillType == "1201")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_POStockInBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_POStockInBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_POStockInBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_POStockInBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_POStockInBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            //生产入库单
            else if (HBillType == "1202")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_ProductInBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_ProductInBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_ProductInBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_ProductInBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_ProductInBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            //其他入库单
            else if (HBillType == "1203")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_OtherInBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_OtherInBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_OtherInBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_OtherInBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_OtherInBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            //领料出库单
            else if (HBillType == "1204")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_MateOutBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_MateOutBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_MateOutBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            //销售出库单
            else if (HBillType == "1205")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_SellOutBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_SellOutBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_SellOutBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_SellOutBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_SellOutBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            //其他出库单
            else if (HBillType == "1206")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_OtherOutBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_OtherOutBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_OtherOutBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_OtherOutBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_OtherOutBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            //委外领料单
            else if (HBillType == "1211")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_EntrustOutBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_EntrustOutBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_EntrustOutBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_EntrustOutBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_EntrustOutBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            //生产补料单
            else if (HBillType == "1254")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_MateReplenishOutBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_MateReplenishOutBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_MateReplenishOutBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_MateReplenishOutBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_MateReplenishOutBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            //委外补料单
            else if (HBillType == "1255")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_EntrustReplenishOutBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            //直接调拨单
            else if (HBillType == "1207")
            {
                //校验-是否校对仓库仓位('Y'为校对)
                if (oSystemParameterMain.Kf_MoveStockBillCheck_WHSPCtl.ToUpper() == "N")
                {
                    sWHSPCtl = "N";
                }
                //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分)
                if (oSystemParameterMain.Kf_MoveStockBillCheck_MultilineCtl.ToUpper() == "Y")
                {
                    sMultilineCtl = "Y";
                }
                //校验数量控制(小于等于应收、完全等于应收、不控制)
                if (oSystemParameterMain.Kf_MoveStockBillCheck_MustQtyCtl == "小于等于应收")
                {
                    sMustQtyCtl = "小于等于应收";
                }
                else if (oSystemParameterMain.Kf_MoveStockBillCheck_MustQtyCtl == "不控制")
                {
                    sMustQtyCtl = "不控制";
                }
                else
                {
                    sMustQtyCtl = "完全等于应收";
                }
                //一次扫码控制('Y'为控制)
                if (oSystemParameterMain.Kf_MoveStockBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
            }
            #endregion
            try
            {
                //扫描托条码,将托条码信息写入条码出入库临时表
                DataSet ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_BillCheck " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HStockOrgID.ToString() + ",'" + HMaker + "','" + sMustQtyCtl + "','" + sWMSStockCtl + "','" + sFIFOCtl + "','" + sOneScanCtl + "','" + sWHSPCtl + "','" + sMultilineCtl + "','" + sWMS_CloudMode + "'", "h_p_WMS_AddPackBarCode_BillCheck");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    sErrMsg = "扫描托条码写入条码出入库临时表发生错误!";
                    return null;
                }
                else
                {
                    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
                    {
                        sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                        return null;
                    }
                }
                oBar.HBarType = "物料条码";
                return oBar;
            }
            catch (Exception e)
            {
                sErrMsg = e.Message;
                return null;
            }
        }
        #endregion
        #region 一键扫码(原单据非扫码生成)        *校验模式
        //一键扫码模式,根据条码前缀走 不同方法(仓库条码、仓位条码、单据号条码、物料条码)
@@ -56179,45 +56548,60 @@
                            //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码
                            if (dal.omodel_View.HBarCodeType == "托盘条码")
                            {
                                //分解托盘条码得到明细条码信息写入条码出入库临时表
                                DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode");
                                if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                                //将托条码信息写入条码出入库临时表
                                oBar = get_SavePonderationBillMain_Temp_PackBarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HOWNERID, oSystemParameter.omodel, ref sErrMsg);
                                if (oBar == null)
                                {
                                    sErrMsg = "分解托盘条码发生错误!";
                                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                    return null;
                                }
                                else
                                {
                                    if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1)
                                    {
                                        sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]);
                                        return null;
                                    }
                                    else
                                    {
                                        for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                        {
                                            dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]);
                                            dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeType"]);
                                            dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HMaterID"]);
                                            dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HAuxPropID"]);
                                            dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBatchNo"]);
                                            dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[i]["HQty"]);
                                            dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceInterID"]);
                                            dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceEntryID"]);
                                            dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HSourceBillNo"]);
                                            dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HMTONo"]);
                                            //将物料条码信息写入条码出入库临时表
                                            if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                            {
                                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                                return null;
                                            }
                                        }
                                    }
                                    return oBar;
                                }
                                #region 扫描托条码原调用方法 20241226前
                                ////分解托盘条码得到明细条码信息写入条码出入库临时表
                                //DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode");
                                //if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                                //{
                                //    sErrMsg = "分解托盘条码发生错误!";
                                //    return null;
                                //}
                                //else
                                //{
                                //    if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1)
                                //    {
                                //        sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]);
                                //        return null;
                                //    }
                                //    else
                                //    {
                                //        for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                //        {
                                //            dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]);
                                //            dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeType"]);
                                //            dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HMaterID"]);
                                //            dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HAuxPropID"]);
                                //            dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBatchNo"]);
                                //            dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[i]["HQty"]);
                                //            dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceInterID"]);
                                //            dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceEntryID"]);
                                //            dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HSourceBillNo"]);
                                //            dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HMTONo"]);
                                //            //将物料条码信息写入条码出入库临时表
                                //            if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                //            {
                                //                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                //                return null;
                                //            }
                                //        }
                                //    }
                                //    return oBar;
                                //}
                                #endregion
                            }
                            else
                            //条码类型不为托盘条码
@@ -56263,43 +56647,15 @@
                                //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码
                                if (dal.omodel_View.HBarCodeType == "托盘条码")
                                {
                                    //分解托盘条码得到明细条码信息写入条码出入库临时表
                                    DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode");
                                    if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                                    //将托条码信息写入条码出入库临时表
                                    oBar = get_SavePonderationBillMain_Temp_PackBarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HOWNERID, oSystemParameter.omodel, ref sErrMsg);
                                    if (oBar == null)
                                    {
                                        sErrMsg = "分解托盘条码发生错误!";
                                        sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                        return null;
                                    }
                                    else
                                    {
                                        if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1)
                                        {
                                            sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]);
                                            return null;
                                        }
                                        else
                                        {
                                            for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                            {
                                                dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]);
                                                dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeType"]);
                                                dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HMaterID"]);
                                                dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HAuxPropID"]);
                                                dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBatchNo"]);
                                                dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[i]["HQty"]);
                                                dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceInterID"]);
                                                dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceEntryID"]);
                                                dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HSourceBillNo"]);
                                                dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HMTONo"]);
                                                //将物料条码信息写入条码出入库临时表
                                                if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                                {
                                                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                                    return null;
                                                }
                                            }
                                        }
                                        return oBar;
                                    }
                                }