YL
2022-01-14 c128ba826d679c90254e5a165791d14c5c96f358
Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-WEBS
1个文件已修改
793 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 793 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -34075,361 +34075,502 @@
        #endregion
        #region 生产领料    扫描源单条码
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_MateOut(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HOWNERID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
            Int64 sMulSourceFlag = 0;   //多源单标志(0为非多源单模式,1为多源单模式)
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBill(ref sErrMsg) == false)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg;
                return null;
            }
            if (oSystemParameter.omodel.Kf_MateOutBill_MulSourceBill.ToUpper() == "Y") //系统参数  生产领料单-多源单模式
            {
                sMulSourceFlag = 1;
            }
            //将源单信息存入条码出入库临时表
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_MateOut " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HPTQty.ToString() + "," + HPlanMode.ToString() + "," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_MateOut");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";将源单信息存入条码出入库临时表失败!";
                return null;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
                {
                    //先进先出控制
                    if (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y")  //系统参数  生产领料单-先进先出控制
                    {
                        DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_MateOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString(), "h_p_WMS_AddSourceFIFO_MateOut");
                        if (FIFO == null || FIFO.Tables[0].Rows.Count == 0)
                        {
                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";存入先进先出临时表失败!";
                            return null;
                        }
                        else
                        {
                            if (DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0][0]) == 1)
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HRemark"]);
                                return null;
                            }
                        }
                    }
                    oBar.HMulSourceFlag = sMulSourceFlag;
                    oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]);
                    oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]);
                    oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]);
                    oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]);
                    return oBar;
                }
                else
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                    return null;
                }
            }
        }
        #endregion
        #region 委外出库    扫描源单条码
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_EntrustOut(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
            Int64 sMulSourceFlag = 0;   //多源单标志(0为非多源单模式,1为多源单模式)
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBill(ref sErrMsg) == false)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg;
                return null;
            }
            if (oSystemParameter.omodel.Kf_EntrustOutBill_MulSourceBill.ToUpper() == "Y") //系统参数  委外出库单-多源单模式
            {
                sMulSourceFlag = 1;
            }
            //将源单信息存入条码出入库临时表
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_EntrustOut " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_EntrustOut");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";将源单信息存入条码出入库临时表失败!";
                return null;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
                {
                    //先进先出控制
                    if (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl == "Y")  //系统参数  委外出库单-先进先出控制
                    {
                        DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_EntrustOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString(), "h_p_WMS_AddSourceFIFO_EntrustOut");
                        if (FIFO == null || FIFO.Tables[0].Rows.Count == 0)
                        {
                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";存入先进先出临时表失败!";
                            return null;
                        }
                        else
                        {
                            if (DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0][0]) == 1)
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HRemark"]);
                                return null;
                            }
                        }
                    }
                    oBar.HMulSourceFlag = sMulSourceFlag;
                    oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]);
                    oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]);
                    oBar.HSupID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSupID"]);
                    oBar.HSupName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSupName"]);
                    oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]);
                    oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]);
                    return oBar;
                }
                else
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                    return null;
                }
            }
        }
        #endregion
//        #region 扫描物料条码调用方法
//        #region 扫描物料条码
        #endregion
//        [WebMethod]
//        public Model.ClsKf_ICStockBill_WMS get_MaterBarCode_New(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID, Int64 HStockOutOrgID, string HExpressNumber, ref string sHSourceBillNo, ref string sHSourceBillType, ref long sHSupID, ref string sHSupName, ref long sHDeptID, ref string sHDeptName, ref string sErrMsg)
//        {
//            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
//            Model.ClsKf_ICStockBill_WMS model = new Model.ClsKf_ICStockBill_WMS();
//            //获取系统参数
//            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
//            if (oSystemParameter.ShowBill(ref sErrMsg) == false)
//            {
//                sErrMsg = "获取系统参数失败! " + sErrMsg;
//                return null;
//            }
//            //判断条码是否为空
//            if (HBarCode.Trim() == "")
//            {
//                sErrMsg = "条码不能为空,请重新扫描物料条码!";
//                return null;
//            }
//            //判断条码是否含特殊符号 # ,如果含有则拆分,截取 # 前字符串
//            string[] NewBarCode;
//            if (HBarCode.CompareTo("#") > 0)
//            {
//                NewBarCode = HBarCode.Split(Convert.ToChar("#"));
//                HBarCode = NewBarCode[0];
//            }
//            //获取条码档案信息
//            Model.ClsGy_BarCodeBill_WMS_Model_View oBar = new Model.ClsGy_BarCodeBill_WMS_Model_View();
//            DataSet ds1 = oCn.RunProcReturn("Select * from h_v_Gy_BarCodeBill_New Where HBarCode='" + HBarCode + "'", "h_v_Gy_BarCodeBill_New");
//            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
//            {
//                sErrMsg = "所扫描物料条码:" + HBarCode + " 无效,不存在条码档案中!";
//                return null;
//            }
//            else
//            {
//                oBar.HItemID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HItemID"]);
//                oBar.HBarCode = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBarCode"]);
//                oBar.HBarCodeType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBarCodeType"]);
//                oBar.HStopflag = DBUtility.ClsPub.isBool(ds1.Tables[0].Rows[0]["HStopflag"]);
//                oBar.HRemark = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
//                oBar.HMaterID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HMaterID"]);
//                oBar.HUnitID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HUnitID"]);
//                oBar.HAuxPropID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HAuxPropID"]);
//                oBar.HBatchNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBatchNo"]);
//                oBar.HQty = DBUtility.ClsPub.isDoule(ds1.Tables[0].Rows[0]["HQty"]);
//                oBar.HSourceInterID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSourceInterID"]);
//                oBar.HSourceEntryID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSourceEntryID"]);
//                oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]);
//                oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]);
//                oBar.HMTONo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HMTONo"]);
//                oBar.HSTOCKORGID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSTOCKORGID"]);
//                oBar.HOWNERID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HOWNERID"]);
//            }
//            //判断条码是否可用
//            if (oBar.HStopflag)
//            {
//                sErrMsg = "所扫描物料条码:" + HBarCode + " 已作废,不允许进行扫码操作!";
//                return null;
//            }
//            //入库、汇报模块,有源单条码 且 条码类型为唯一条码,扫描物料条码时自动带出源单信息
//            //采购入库(1201)、产品入库(1202)、委外入库(1210)、生产汇报(3711)
//            if (oBar.HBarCodeType == "唯一条码" && oBar.HSourceBillNo == "" && HSourceBillType != "-1"
//                && (HBillType == "1201" || HBillType == "1202" || HBillType == "1210" || HBillType == "3711"))
//            {
//                Int64 HAccessFlag = 1;   //是否物料条码带出源单信息标志(0为直接扫源单条码,1为物料条码带出源单信息)
//                model = getSourceBill_New(HInterID, HBillNo, HBillType, oBar.HSourceBillNo, oBar.HSourceBillType, HRedBlueFlag, HMaker, 0, 0, 0, HStockOrgID, HAccessFlag, SourceFlag, oSystemParameter.omodel, ref sErrMsg);
//                if (model == null)
//                {
//                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单失败!" + sErrMsg;
//                    return null;
//                }
//                else
//                {
//                    HSourceBillType = model.HSourceBillType;
//                    SourceFlag = true;
//                    return model;
//                }
//            }
//            //1、首次扫码防串单判断; 2、源单类型是否在源单列表里判断;3、唯一条码是否存在相同条码判断; 4、有源单,物料是否在源单中判断
//            DataSet ds2 = oCn.RunProcReturn("exec h_p_WMS_GetSourceInterID_AddBarCode " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "','" + HSourceBillType + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + ",'" + oSystemParameter.omodel.WMS_BarCodeMustSameSourceBill + "'," + HStockOrgID.ToString(), "h_p_WMS_GetSourceInterID_AddBarCode");
//            if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
//            {
//                sErrMsg = "扫描物料条码,判断条码是否在源单中时发生错误!";
//                return null;
//            }
//            else
//            {
//                if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0][0]) == 1)
//                {
//                    sErrMsg = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HRemark"]);
//                    return null;
//                }
//                else
//                {
//                    oBar.HSourceInterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"]);
//                    oBar.HSourceEntryID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"]);
//                    oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillNo"]);
//                    oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillType"]);
//                    oBar.HMaterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HMaterID"]);
//                    oBar.HinitQty = DBUtility.ClsPub.isDoule(ds2.Tables[0].Rows[0]["HQtyMust"]);    //剩余未扫码数量(应收数量-扫码总数量 或0),非唯一条码用到
//                }
//            }
        //        #region 扫描物料条码调用方法
//            //获取、判断仓库、仓位
//            DataSet ds3 = oCn.RunProcReturn("exec h_p_WMS_GetWHIDandSPID_AddBarCode " + HInterID.ToString() + ",'" + HBillType + "'," + HWhID + "," + HSPID + "," + HSCWhID + "," + HSCSPID + "," + oBar.HSourceInterID + "," + oBar.HSourceEntryID + "," + oBar.HMaterID + "," + HStockOrgID + "," + HStockOutOrgID + ",'" + oBar.HBarCodeType + "','" + oSystemParameter.omodel.WMS_WMSStockCtl + "'", "h_p_WMS_GetWHIDandSPID_AddBarCode");
//            if (ds3 == null || ds3.Tables[0].Rows.Count == 0)
//            {
//                sErrMsg = "扫描物料条码,判断仓库、仓位值时发生错误!";
//                return null;
//            }
//            else
//            {
//                if (DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0][0]) == 1)
//                {
//                    sErrMsg = DBUtility.ClsPub.isStrNull(ds3.Tables[0].Rows[0]["HRemark"]);
//                    return null;
//                }
//                else
//                {
//                    model.HWhID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HWHID"]);
//                    model.HSPID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSPID"]);
//                    model.HSCWhID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSCWHID"]);
//                    model.HSCSPID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSCSPID"]);
//                }
//            }
        //        #region 扫描物料条码
//            //初步获取条码数量
//            if (oBar.HBarCodeType == "唯一条码")
//            {
//                if (HQty > 0 && oBar.HQty > HQty)   //0<界面递入数量<条码档案数量,取递入数量
//                {
//                    oBar.HQty = HQty;
//                }
//            }
//            else
//            {
//                if (HQty > 0)               //界面递入数量>0,取递入数量
//                {
//                    oBar.HQty = HQty;
//                }
//                else if (oBar.HinitQty > 0) //界面递入数量<0,源单剩余未扫码数量>0,取源单剩余未扫码数量
//                {
//                    oBar.HQty = oBar.HinitQty;
//                }
//            }
        //        [WebMethod]
        //        public Model.ClsKf_ICStockBill_WMS get_MaterBarCode_New(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID, Int64 HStockOutOrgID, string HExpressNumber, ref string sHSourceBillNo, ref string sHSourceBillType, ref long sHSupID, ref string sHSupName, ref long sHDeptID, ref string sHDeptName, ref string sErrMsg)
        //        {
        //            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        //            Model.ClsKf_ICStockBill_WMS model = new Model.ClsKf_ICStockBill_WMS();
        //            //获取系统参数
        //            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        //            if (oSystemParameter.ShowBill(ref sErrMsg) == false)
        //            {
        //                sErrMsg = "获取系统参数失败! " + sErrMsg;
        //                return null;
        //            }
        //            //判断条码是否为空
        //            if (HBarCode.Trim() == "")
        //            {
        //                sErrMsg = "条码不能为空,请重新扫描物料条码!";
        //                return null;
        //            }
        //            //判断条码是否含特殊符号 # ,如果含有则拆分,截取 # 前字符串
        //            string[] NewBarCode;
        //            if (HBarCode.CompareTo("#") > 0)
        //            {
        //                NewBarCode = HBarCode.Split(Convert.ToChar("#"));
        //                HBarCode = NewBarCode[0];
        //            }
        //            //获取条码档案信息
        //            Model.ClsGy_BarCodeBill_WMS_Model_View oBar = new Model.ClsGy_BarCodeBill_WMS_Model_View();
        //            DataSet ds1 = oCn.RunProcReturn("Select * from h_v_Gy_BarCodeBill_New Where HBarCode='" + HBarCode + "'", "h_v_Gy_BarCodeBill_New");
        //            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
        //            {
        //                sErrMsg = "所扫描物料条码:" + HBarCode + " 无效,不存在条码档案中!";
        //                return null;
        //            }
        //            else
        //            {
        //                oBar.HItemID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HItemID"]);
        //                oBar.HBarCode = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBarCode"]);
        //                oBar.HBarCodeType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBarCodeType"]);
        //                oBar.HStopflag = DBUtility.ClsPub.isBool(ds1.Tables[0].Rows[0]["HStopflag"]);
        //                oBar.HRemark = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
        //                oBar.HMaterID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HMaterID"]);
        //                oBar.HUnitID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HUnitID"]);
        //                oBar.HAuxPropID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HAuxPropID"]);
        //                oBar.HBatchNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBatchNo"]);
        //                oBar.HQty = DBUtility.ClsPub.isDoule(ds1.Tables[0].Rows[0]["HQty"]);
        //                oBar.HSourceInterID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSourceInterID"]);
        //                oBar.HSourceEntryID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSourceEntryID"]);
        //                oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]);
        //                oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]);
        //                oBar.HMTONo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HMTONo"]);
        //                oBar.HSTOCKORGID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSTOCKORGID"]);
        //                oBar.HOWNERID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HOWNERID"]);
        //            }
        //            //判断条码是否可用
        //            if (oBar.HStopflag)
        //            {
        //                sErrMsg = "所扫描物料条码:" + HBarCode + " 已作废,不允许进行扫码操作!";
        //                return null;
        //            }
        //            //入库、汇报模块,有源单条码 且 条码类型为唯一条码,扫描物料条码时自动带出源单信息
        //            //采购入库(1201)、产品入库(1202)、委外入库(1210)、生产汇报(3711)
        //            if (oBar.HBarCodeType == "唯一条码" && oBar.HSourceBillNo == "" && HSourceBillType != "-1"
        //                && (HBillType == "1201" || HBillType == "1202" || HBillType == "1210" || HBillType == "3711"))
        //            {
        //                Int64 HAccessFlag = 1;   //是否物料条码带出源单信息标志(0为直接扫源单条码,1为物料条码带出源单信息)
        //                model = getSourceBill_New(HInterID, HBillNo, HBillType, oBar.HSourceBillNo, oBar.HSourceBillType, HRedBlueFlag, HMaker, 0, 0, 0, HStockOrgID, HAccessFlag, SourceFlag, oSystemParameter.omodel, ref sErrMsg);
        //                if (model == null)
        //                {
        //                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单失败!" + sErrMsg;
        //                    return null;
        //                }
        //                else
        //                {
        //                    HSourceBillType = model.HSourceBillType;
        //                    SourceFlag = true;
        //                    return model;
        //                }
        //            }
//            //生产领料(1204)、销售出库(1205)、其他出库蓝字(1206)、委外出库(1211)
//            //外购退料(1239)、产品退库(1245)、其他入库红字(1248)、委外退库(1246)
//            //生产补料(1254)
//            if (HBillType == "1204" || HBillType == "1205" || HBillType == "1206" || HBillType == "1211"
//                || HBillType == "1239" || HBillType == "1245" || HBillType == "1248" || HBillType == "1246"
//                || HBillType == "1254")
//            {
//                if (oSystemParameter.omodel.WMS_ERPStockCtl == "Y")
//                {
        //            //1、首次扫码防串单判断; 2、源单类型是否在源单列表里判断;3、唯一条码是否存在相同条码判断; 4、有源单,物料是否在源单中判断
        //            DataSet ds2 = oCn.RunProcReturn("exec h_p_WMS_GetSourceInterID_AddBarCode " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "','" + HSourceBillType + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + ",'" + oSystemParameter.omodel.WMS_BarCodeMustSameSourceBill + "'," + HStockOrgID.ToString(), "h_p_WMS_GetSourceInterID_AddBarCode");
        //            if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
        //            {
        //                sErrMsg = "扫描物料条码,判断条码是否在源单中时发生错误!";
        //                return null;
        //            }
        //            else
        //            {
        //                if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0][0]) == 1)
        //                {
        //                    sErrMsg = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HRemark"]);
        //                    return null;
        //                }
        //                else
        //                {
        //                    oBar.HSourceInterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"]);
        //                    oBar.HSourceEntryID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"]);
        //                    oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillNo"]);
        //                    oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillType"]);
        //                    oBar.HMaterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HMaterID"]);
        //                    oBar.HinitQty = DBUtility.ClsPub.isDoule(ds2.Tables[0].Rows[0]["HQtyMust"]);    //剩余未扫码数量(应收数量-扫码总数量 或0),非唯一条码用到
        //                }
        //            }
//                }
        //            //获取、判断仓库、仓位
        //            DataSet ds3 = oCn.RunProcReturn("exec h_p_WMS_GetWHIDandSPID_AddBarCode " + HInterID.ToString() + ",'" + HBillType + "'," + HWhID + "," + HSPID + "," + HSCWhID + "," + HSCSPID + "," + oBar.HSourceInterID + "," + oBar.HSourceEntryID + "," + oBar.HMaterID + "," + HStockOrgID + "," + HStockOutOrgID + ",'" + oBar.HBarCodeType + "','" + oSystemParameter.omodel.WMS_WMSStockCtl + "'", "h_p_WMS_GetWHIDandSPID_AddBarCode");
        //            if (ds3 == null || ds3.Tables[0].Rows.Count == 0)
        //            {
        //                sErrMsg = "扫描物料条码,判断仓库、仓位值时发生错误!";
        //                return null;
        //            }
        //            else
        //            {
        //                if (DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0][0]) == 1)
        //                {
        //                    sErrMsg = DBUtility.ClsPub.isStrNull(ds3.Tables[0].Rows[0]["HRemark"]);
        //                    return null;
        //                }
        //                else
        //                {
        //                    model.HWhID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HWHID"]);
        //                    model.HSPID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSPID"]);
        //                    model.HSCWhID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSCWHID"]);
        //                    model.HSCSPID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSCSPID"]);
        //                }
        //            }
        //            //初步获取条码数量
        //            if (oBar.HBarCodeType == "唯一条码")
        //            {
        //                if (HQty > 0 && oBar.HQty > HQty)   //0<界面递入数量<条码档案数量,取递入数量
        //                {
        //                    oBar.HQty = HQty;
        //                }
        //            }
        //            else
        //            {
        //                if (HQty > 0)               //界面递入数量>0,取递入数量
        //                {
        //                    oBar.HQty = HQty;
        //                }
        //                else if (oBar.HinitQty > 0) //界面递入数量<0,源单剩余未扫码数量>0,取源单剩余未扫码数量
        //                {
        //                    oBar.HQty = oBar.HinitQty;
        //                }
        //            }
        //            //生产领料(1204)、销售出库(1205)、其他出库蓝字(1206)、委外出库(1211)
        //            //外购退料(1239)、产品退库(1245)、其他入库红字(1248)、委外退库(1246)
        //            //生产补料(1254)
        //            if (HBillType == "1204" || HBillType == "1205" || HBillType == "1206" || HBillType == "1211"
        //                || HBillType == "1239" || HBillType == "1245" || HBillType == "1248" || HBillType == "1246"
        //                || HBillType == "1254")
        //            {
        //                if (oSystemParameter.omodel.WMS_ERPStockCtl == "Y")
        //                {
        //                }
//                //非唯一条码扫描时判断仓库仓位是否已选择
//                if (dal.omodel_View.HBarCodeType != "唯一条码")
//                {
//                    if (oSystemParameter.omodel.WMS_ERPStockCtl == "N")
//                    {
        //                //非唯一条码扫描时判断仓库仓位是否已选择
        //                if (dal.omodel_View.HBarCodeType != "唯一条码")
        //                {
        //                    if (oSystemParameter.omodel.WMS_ERPStockCtl == "N")
        //                    {
//                    }
//                    else
//                    {
//                        //判断ERP库存   返回ERP库存数量
//                        DataSet ds6 = oCn.RunProcReturn("exec h_p_IF_CheckQtyByERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + dal.omodel_View.HMaterID.ToString() + "," + dal.omodel_View.HAuxPropID.ToString() + ",'" + dal.omodel_View.HBatchNo + "'," + sRelQty.ToString() + "," + HOWNERID.ToString(), "h_p_IF_CheckQtyByERPICInventory");
//                        if (ds6 == null || ds6.Tables[0].Rows.Count == 0)
//                        {
//                            sErrMsg = "判断ERP库存,未知错误!";
//                            return false;
//                        }
//                        else
//                        {
//                            if (DBUtility.ClsPub.isLong(ds6.Tables[0].Rows[0][0]) == 0)
//                            {
//                                dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(ds6.Tables[0].Rows[0]["HMaterID"]);
//                                HQty = DBUtility.ClsPub.isDoule(ds6.Tables[0].Rows[0]["HQty"]);
//                            }
//                            else
//                            {
//                                sErrMsg = DBUtility.ClsPub.isStrNull(ds6.Tables[0].Rows[0]["HRemark"]);
//                                return false;
//                            }
//                        }
//                    }
//                }
//                else
//                {
//                    //判断条码库存   返回库存数量 仓库 仓位
//                    DAL.ClsKF_PonderationBillMain_Temp_View Tempdal = new DAL.ClsKF_PonderationBillMain_Temp_View();
//                    if (Tempdal.CheckQtyByBarCode(HBillID, HBillType, sBarCode, ref HWhID, ref HSPID, sRelQty, ref sRelQty))
//                    {
        //                    }
        //                    else
        //                    {
        //                        //判断ERP库存   返回ERP库存数量
        //                        DataSet ds6 = oCn.RunProcReturn("exec h_p_IF_CheckQtyByERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + dal.omodel_View.HMaterID.ToString() + "," + dal.omodel_View.HAuxPropID.ToString() + ",'" + dal.omodel_View.HBatchNo + "'," + sRelQty.ToString() + "," + HOWNERID.ToString(), "h_p_IF_CheckQtyByERPICInventory");
        //                        if (ds6 == null || ds6.Tables[0].Rows.Count == 0)
        //                        {
        //                            sErrMsg = "判断ERP库存,未知错误!";
        //                            return false;
        //                        }
        //                        else
        //                        {
        //                            if (DBUtility.ClsPub.isLong(ds6.Tables[0].Rows[0][0]) == 0)
        //                            {
        //                                dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(ds6.Tables[0].Rows[0]["HMaterID"]);
        //                                HQty = DBUtility.ClsPub.isDoule(ds6.Tables[0].Rows[0]["HQty"]);
        //                            }
        //                            else
        //                            {
        //                                sErrMsg = DBUtility.ClsPub.isStrNull(ds6.Tables[0].Rows[0]["HRemark"]);
        //                                return false;
        //                            }
        //                        }
        //                    }
        //                }
        //                else
        //                {
        //                    //判断条码库存   返回库存数量 仓库 仓位
        //                    DAL.ClsKF_PonderationBillMain_Temp_View Tempdal = new DAL.ClsKF_PonderationBillMain_Temp_View();
        //                    if (Tempdal.CheckQtyByBarCode(HBillID, HBillType, sBarCode, ref HWhID, ref HSPID, sRelQty, ref sRelQty))
        //                    {
//                    }
//                    else
//                    {
//                        if (sRelQty == 0)
//                        {
//                            sErrMsg = "无库存!";
//                            return false;
//                        }
//                        else
//                        {
//                            sErrMsg = "库存不足,已获取实际库存数量!";
//                        }
//                    }
//                }
//            }
//            //采购入库(1201)、产品入库(1202)、其他入库蓝字(1203)、委外入库(1210)
//            //生产退料(1244)、销售退库(1247)、其他出库红字(1249)、委外退料(1238)
//            else
//            {
//                //判断并获取 仓库 仓位信息
//                DataSet ds4 = oCn.RunProcReturn("exec h_p_WMS_GetBillWHID " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_WMS_GetBillWHID");
//                if (ds4 == null || ds4.Tables[0].Rows.Count == 0)
//                {
//                    sErrMsg = "判断并获取仓库仓位信息,未知错误!";
//                    return false;
//                }
//                else
//                {
//                    if (DBUtility.ClsPub.isLong(ds4.Tables[0].Rows[0][0]) == 0)
//                    {
//                        HWhID = DBUtility.ClsPub.isLong(ds4.Tables[0].Rows[0]["HWHID"]);
//                        HSPID = DBUtility.ClsPub.isLong(ds4.Tables[0].Rows[0]["HSPID"]);
//                    }
//                    else
//                    {
//                        sErrMsg = DBUtility.ClsPub.isStrNull(ds4.Tables[0].Rows[0]["HRemark"]);
//                        return false;
//                    }
//                }
//                //判断条码扫描数量   返回剩余未扫描数量
//                if (tem.IsBarCode_New(sBarCode, HBillType, HRedBlueFlag, ref sRelQty, ref sErrMsg))
//                {
        //                    }
        //                    else
        //                    {
        //                        if (sRelQty == 0)
        //                        {
        //                            sErrMsg = "无库存!";
        //                            return false;
        //                        }
        //                        else
        //                        {
        //                            sErrMsg = "库存不足,已获取实际库存数量!";
        //                        }
        //                    }
        //                }
        //            }
        //            //采购入库(1201)、产品入库(1202)、其他入库蓝字(1203)、委外入库(1210)
        //            //生产退料(1244)、销售退库(1247)、其他出库红字(1249)、委外退料(1238)
        //            else
        //            {
        //                //判断并获取 仓库 仓位信息
        //                DataSet ds4 = oCn.RunProcReturn("exec h_p_WMS_GetBillWHID " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_WMS_GetBillWHID");
        //                if (ds4 == null || ds4.Tables[0].Rows.Count == 0)
        //                {
        //                    sErrMsg = "判断并获取仓库仓位信息,未知错误!";
        //                    return false;
        //                }
        //                else
        //                {
        //                    if (DBUtility.ClsPub.isLong(ds4.Tables[0].Rows[0][0]) == 0)
        //                    {
        //                        HWhID = DBUtility.ClsPub.isLong(ds4.Tables[0].Rows[0]["HWHID"]);
        //                        HSPID = DBUtility.ClsPub.isLong(ds4.Tables[0].Rows[0]["HSPID"]);
        //                    }
        //                    else
        //                    {
        //                        sErrMsg = DBUtility.ClsPub.isStrNull(ds4.Tables[0].Rows[0]["HRemark"]);
        //                        return false;
        //                    }
        //                }
        //                //判断条码扫描数量   返回剩余未扫描数量
        //                if (tem.IsBarCode_New(sBarCode, HBillType, HRedBlueFlag, ref sRelQty, ref sErrMsg))
        //                {
//                }
//                else
//                {
//                    sErrMsg = sErrMsg;
//                    return false;
//                }
//            }
//        }
        //                }
        //                else
        //                {
        //                    sErrMsg = sErrMsg;
        //                    return false;
        //                }
        //            }
        //        }
//            if (HExpressNumber == "工序汇报转移单")
//            {
//                model.HSubBillType = "1270";
//                HExpressNumber = "";
//            }
//    model.HInterID = HBillID;
//            model.HBillNo = HBillNo;
//            model.HBillType = HBillType;
//            model.HMaker = HMaker;
//            //
//            model.HMaterID = dal.omodel_View.HMaterID;
//            model.HAuxPropID = dal.omodel_View.HAuxPropID;
//            model.HErpClsID = dal.omodel_View.HErpClsID;
//            model.HQty = sRelQty;
//            model.HQtyMust = dal.omodel_View.HinitQty;
//            model.HBarCode = dal.omodel_View.HBarCode;
//            model.HBatchNo = dal.omodel_View.HBatchNo;
//            model.HMTONo = dal.omodel_View.HMTONo;
        //            if (HExpressNumber == "工序汇报转移单")
        //            {
        //                model.HSubBillType = "1270";
        //                HExpressNumber = "";
        //            }
        //    model.HInterID = HBillID;
        //            model.HBillNo = HBillNo;
        //            model.HBillType = HBillType;
        //            model.HMaker = HMaker;
        //            //
        //            model.HMaterID = dal.omodel_View.HMaterID;
        //            model.HAuxPropID = dal.omodel_View.HAuxPropID;
        //            model.HErpClsID = dal.omodel_View.HErpClsID;
        //            model.HQty = sRelQty;
        //            model.HQtyMust = dal.omodel_View.HinitQty;
        //            model.HBarCode = dal.omodel_View.HBarCode;
        //            model.HBatchNo = dal.omodel_View.HBatchNo;
        //            model.HMTONo = dal.omodel_View.HMTONo;
//            model.HWhID = HWhID;
//            model.HStockPlaceID = HSPID;
//            model.HSourceInterID = dal.omodel_View.HSourceInterID;
//            model.HSourceEntryID = dal.omodel_View.HSourceEntryID;
//            model.HSourceBillNo = dal.omodel_View.HSourceBillNo;
//            model.HSourceBillType = HSourceBillType;
//            model.HRedBlueFlag = HRedBlueFlag;
//            model.HPieceQty = 1;
//            model.HSTOCKORGID = HOWNERID;
//            model.HOWNERID = HOWNERID;
//            model.HCusBarCode = HExpressNumber;
        //            model.HWhID = HWhID;
        //            model.HStockPlaceID = HSPID;
        //            model.HSourceInterID = dal.omodel_View.HSourceInterID;
        //            model.HSourceEntryID = dal.omodel_View.HSourceEntryID;
        //            model.HSourceBillNo = dal.omodel_View.HSourceBillNo;
        //            model.HSourceBillType = HSourceBillType;
        //            model.HRedBlueFlag = HRedBlueFlag;
        //            model.HPieceQty = 1;
        //            model.HSTOCKORGID = HOWNERID;
        //            model.HOWNERID = HOWNERID;
        //            model.HCusBarCode = HExpressNumber;
//            ////获取系统参数
//            //Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
//            //if (oSystemParameter.ShowBill(ref sErrMsg) == false)
//            //{
//            //    sErrMsg = "获取系统参数失败! " + sErrMsg;
//            //    return false;
//            //}
//            //生产领料单-先进先出控制
//            if (HBillType == "1204" && oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y") //系统参数  生产领料单-先进先出控制
//            {
//                DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HBillID.ToString() + ",'" + HBillType + "','" + model.HBatchNo + "','" + model.HBarCode + "'," + model.HQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode");
//                if (FIFO == null || FIFO.Tables[0].Rows.Count == 0)
//                {
//                    sErrMsg = "请根据先进先出清单扫码!";
//                    return false;
//                }
//                else
//{
//    model.HWhID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HWHID"]);
//    model.HStockPlaceID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HSPID"]);
//    model.HQty = DBUtility.ClsPub.isDoule(FIFO.Tables[0].Rows[0]["HQty"]);
//    model.HQtyMust = DBUtility.ClsPub.isDoule(FIFO.Tables[0].Rows[0]["HSumQtyMust"]);
//    model.HSourceInterID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HSourceInterID"]);
//    model.HSourceEntryID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HSourceEntryID"]);
//    model.HSourceBillNo = DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HSourceBillNo"]);
//    model.HSourceBillType = DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HSourceBillType"]);
//}
//            }
        //            ////获取系统参数
        //            //Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        //            //if (oSystemParameter.ShowBill(ref sErrMsg) == false)
        //            //{
        //            //    sErrMsg = "获取系统参数失败! " + sErrMsg;
        //            //    return false;
        //            //}
        //            //生产领料单-先进先出控制
        //            if (HBillType == "1204" && oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y") //系统参数  生产领料单-先进先出控制
        //            {
        //                DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HBillID.ToString() + ",'" + HBillType + "','" + model.HBatchNo + "','" + model.HBarCode + "'," + model.HQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode");
        //                if (FIFO == null || FIFO.Tables[0].Rows.Count == 0)
        //                {
        //                    sErrMsg = "请根据先进先出清单扫码!";
        //                    return false;
        //                }
        //                else
        //{
        //    model.HWhID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HWHID"]);
        //    model.HStockPlaceID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HSPID"]);
        //    model.HQty = DBUtility.ClsPub.isDoule(FIFO.Tables[0].Rows[0]["HQty"]);
        //    model.HQtyMust = DBUtility.ClsPub.isDoule(FIFO.Tables[0].Rows[0]["HSumQtyMust"]);
        //    model.HSourceInterID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HSourceInterID"]);
        //    model.HSourceEntryID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HSourceEntryID"]);
        //    model.HSourceBillNo = DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HSourceBillNo"]);
        //    model.HSourceBillType = DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HSourceBillType"]);
        //}
        //            }
//            //物料条码写入临时表时,判断仓库仓位是否正确
//            DataSet ds5 = oCn.RunProcReturn("exec h_p_WMS_CheckWHandSP " + model.HWhID.ToString() + "," + model.HStockPlaceID.ToString(), "h_p_WMS_CheckWHandSP");
//if (ds5 == null || ds5.Tables[0].Rows.Count == 0)
//{
//    sErrMsg = "扫描物料条码存入临时表时判断仓库仓位是否正确,未知错误!";
//    return false;
//}
//else
//{
//    if (DBUtility.ClsPub.isLong(ds5.Tables[0].Rows[0][0]) == 1)
//    {
//        sErrMsg = DBUtility.ClsPub.isStrNull(ds5.Tables[0].Rows[0]["HRemark"]);
//        return false;
//    }
//}
        //            //物料条码写入临时表时,判断仓库仓位是否正确
        //            DataSet ds5 = oCn.RunProcReturn("exec h_p_WMS_CheckWHandSP " + model.HWhID.ToString() + "," + model.HStockPlaceID.ToString(), "h_p_WMS_CheckWHandSP");
        //if (ds5 == null || ds5.Tables[0].Rows.Count == 0)
        //{
        //    sErrMsg = "扫描物料条码存入临时表时判断仓库仓位是否正确,未知错误!";
        //    return false;
        //}
        //else
        //{
        //    if (DBUtility.ClsPub.isLong(ds5.Tables[0].Rows[0][0]) == 1)
        //    {
        //        sErrMsg = DBUtility.ClsPub.isStrNull(ds5.Tables[0].Rows[0]["HRemark"]);
        //        return false;
        //    }
        //}
////将物料条码信息写入出入库条码临时表
//if (set_SavePonderationBillMain_Temp_Select_Qty(model, HQty, ref sErrMsg))
//{
        ////将物料条码信息写入出入库条码临时表
        //if (set_SavePonderationBillMain_Temp_Select_Qty(model, HQty, ref sErrMsg))
        //{
//}
//else
//{
//    sErrMsg = "扫描失败!" + sErrMsg;
//    return false;
//}
//return true;
//        }
        //}
        //else
        //{
        //    sErrMsg = "扫描失败!" + sErrMsg;
        //    return false;
        //}
        //return true;
        //        }
//        #endregion
        //        #endregion
//        #endregion
        //        #endregion
        #region 模具条码处理方法