一键扫码方法、一键扫码多源单模式方法中新增托盘条码判断、扫码处理
1个文件已修改
250 ■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 250 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -28741,15 +28741,59 @@
            //判断是否启用一键扫码模式,Y为启用,未启用时只扫描物料条码
            if (oSystemParameterMain.WMS_OneKeyMode.ToUpper() == "N")
            {
                oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
                if (oBar == null)
                DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
                if (dal.GetInfoByNumber_View(sBarCode))
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                    return null;
                    //如果是托盘条码分解并模拟扫码
                    if (dal.omodel_View.HBarCodeType == "托盘条码")
                    {
                        //分解托条码得到明细条码信息写入出入库条码临时表
                        DataSet dsTBarCode;
                        string sBarCode_MX;
                        dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " +
                        " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum");
                        if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                        {
                            sErrMsg = "没有找到托盘条码对应子条码记录!";
                            return null;
                        }
                        else
                        {
                            for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                            {
                                sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
                                oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
                                if (oBar == null)
                                {
                                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sBarCode_MX + sErrMsg;
                                    return null;
                                }
                                else
                                {
                                    return oBar;
                                }
                            }
                            return oBar;
                        }
                    }
                    else
                    {
                        oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
                        if (oBar == null)
                        {
                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                            return null;
                        }
                        else
                        {
                            return oBar;
                        }
                    }
                }
                else
                {
                    return oBar;
                    sErrMsg = "没有找到该条码!";
                    return null;
                }
            }
            //一键扫码模式,根据条码前缀走 不同方法(仓库、仓位、部门)(源单、物料条码)
@@ -28762,16 +28806,59 @@
                //无返回数据则为物料条码
                if (Dss == null || Dss.Tables[0].Rows.Count == 0)
                {
                    //将物料条码信息写入出入库条码临时表
                    oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
                    if (oBar == null)
                    DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
                    if (dal.GetInfoByNumber_View(sBarCode))
                    {
                        sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                        return null;
                        //如果是托盘条码分解并模拟扫码
                        if (dal.omodel_View.HBarCodeType == "托盘条码")
                        {
                            //分解托条码得到明细条码信息写入出入库条码临时表
                            DataSet dsTBarCode;
                            string sBarCode_MX;
                            dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " +
                            " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum");
                            if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                            {
                                sErrMsg = "没有找到托盘条码对应子条码记录!";
                                return null;
                            }
                            else
                            {
                                for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                {
                                    sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
                                    oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
                                    if (oBar == null)
                                    {
                                        sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sBarCode_MX + sErrMsg;
                                        return null;
                                    }
                                    else
                                    {
                                        return oBar;
                                    }
                                }
                                return oBar;
                            }
                        }
                        else
                        {
                            oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
                            if (oBar == null)
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                return null;
                            }
                            else
                            {
                                return oBar;
                            }
                        }
                    }
                    else
                    {
                        return oBar;
                        sErrMsg = "没有找到该条码!";
                        return null;
                    }
                }
                else
@@ -29638,22 +29725,72 @@
                //判断是否启用一键扫码模式,Y为启用,未启用时只扫描物料条码
                if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N")
                {
                    //将物料条码信息写入出入库条码临时表
                    if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
                    DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
                    if (dal.GetInfoByNumber_View(sBarCode))
                    {
                        oBar.HSourceBillType = sHSourceBillType;
                        oBar.HSourceBillNo = sHSourceBillNo;
                        oBar.HSupID = sHSupID;
                        oBar.HSupName = sHSupName;
                        oBar.HDeptID = sHDeptID;
                        oBar.HDeptName = sHDeptName;
                        //如果是托盘条码分解并模拟扫码
                        if (dal.omodel_View.HBarCodeType == "托盘条码")
                        {
                            //分解托条码得到明细条码信息写入出入库条码临时表
                            DataSet dsTBarCode;
                            string sBarCode_MX;
                            dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " +
                            " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum");
                            if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                            {
                                sErrMsg = "没有找到托盘条码对应子条码记录!";
                                return null;
                            }
                            else
                            {
                                for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                {
                                    sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
                                    if (set_SavePonderationBillMain_Temp_BarCode(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
                                    {
                                        oBar.HSourceBillType = sHSourceBillType;
                                        oBar.HSourceBillNo = sHSourceBillNo;
                                        oBar.HSupID = sHSupID;
                                        oBar.HSupName = sHSupName;
                                        oBar.HDeptID = sHDeptID;
                                        oBar.HDeptName = sHDeptName;
                                        SourceFlag = true;
                                    }
                                    else
                                    {
                                        sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sBarCode_MX + sErrMsg;
                                        //sErrMsg = "扫描失败!" + sErrMsg;
                                        return null;
                                    }
                                }
                                return oBar;
                            }
                        }
                        else
                        {
                            //将物料条码信息写入出入库条码临时表
                            if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
                            {
                                oBar.HSourceBillType = sHSourceBillType;
                                oBar.HSourceBillNo = sHSourceBillNo;
                                oBar.HSupID = sHSupID;
                                oBar.HSupName = sHSupName;
                                oBar.HDeptID = sHDeptID;
                                oBar.HDeptName = sHDeptName;
                            }
                            else
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                return null;
                            }
                            return oBar;
                        }
                    }
                    else
                    {
                        sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                        sErrMsg = "没有找到该条码!";
                        return null;
                    }
                    return oBar;
                }
                //一键扫码模式,根据条码前缀走 不同方法(仓库、仓位、部门)(源单、物料条码)
                else
@@ -29674,23 +29811,72 @@
                    //无返回数据则为物料条码
                    if (Dss == null || Dss.Tables[0].Rows.Count == 0)
                    {
                        //将物料条码信息写入出入库条码临时表
                        if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
                        DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
                        if (dal.GetInfoByNumber_View(sBarCode))
                        {
                            oBar.HSourceBillType = sHSourceBillType;
                            oBar.HSourceBillNo = sHSourceBillNo;
                            oBar.HSupID = sHSupID;
                            oBar.HSupName = sHSupName;
                            oBar.HDeptID = sHDeptID;
                            oBar.HDeptName = sHDeptName;
                            //如果是托盘条码分解并模拟扫码
                            if (dal.omodel_View.HBarCodeType == "托盘条码")
                            {
                                //分解托条码得到明细条码信息写入出入库条码临时表
                                DataSet dsTBarCode;
                                string sBarCode_MX;
                                dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " +
                                " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum");
                                if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                                {
                                    sErrMsg = "没有找到托盘条码对应子条码记录!";
                                    return null;
                                }
                                else
                                {
                                    for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                    {
                                        sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
                                        if (set_SavePonderationBillMain_Temp_BarCode(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
                                        {
                                            oBar.HSourceBillType = sHSourceBillType;
                                            oBar.HSourceBillNo = sHSourceBillNo;
                                            oBar.HSupID = sHSupID;
                                            oBar.HSupName = sHSupName;
                                            oBar.HDeptID = sHDeptID;
                                            oBar.HDeptName = sHDeptName;
                                            SourceFlag = true;
                                        }
                                        else
                                        {
                                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sBarCode_MX + sErrMsg;
                                            //sErrMsg = "扫描失败!" + sErrMsg;
                                            return null;
                                        }
                                    }
                                    return oBar;
                                }
                            }
                            else
                            {
                                //将物料条码信息写入出入库条码临时表
                                if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
                                {
                                    oBar.HSourceBillType = sHSourceBillType;
                                    oBar.HSourceBillNo = sHSourceBillNo;
                                    oBar.HSupID = sHSupID;
                                    oBar.HSupName = sHSupName;
                                    oBar.HDeptID = sHDeptID;
                                    oBar.HDeptName = sHDeptName;
                                }
                                else
                                {
                                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                    return null;
                                }
                                return oBar;
                            }
                        }
                        else
                        {
                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                            //sErrMsg = "扫描失败!" + sErrMsg;
                            sErrMsg = "没有找到该条码!";
                            return null;
                        }
                        return oBar;
                    }
                    else
                    {