一键扫码方法中托盘条码处理修改,按智见、斯莫尔公司来;新增方法:扫码后根据组织、模块类型,判断子表是否刷新
1个文件已修改
237 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 237 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -26989,6 +26989,27 @@
            }
        }
        //根据组织判断扫码后,模块子表是否自动刷新(Y为自动刷新)
        [WebMethod]
        public bool get_SubDisplayByOwner(string sBillType, Int64 HOWNERID)
        {
            DataSet DS;
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            DS = oCN.RunProcReturn("exec h_p_WMS_DisBillEntryList_HOWNERID '" + sBillType + "'," + HOWNERID.ToString(), "h_p_WMS_DisBillEntryList_HOWNERID");
            if (DS == null || DS.Tables[0].Rows.Count == 0)
            {
                return true;
            }
            else if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HDisplay"]) == "N")
            {
                return false;
            }
            else
            {
                return true;
            }
        }
        #endregion
@@ -29725,91 +29746,7 @@
                //判断是否启用一键扫码模式,Y为启用,未启用时只扫描物料条码
                if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N")
                {
                    DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
                    if (dal.GetInfoByNumber_View(sBarCode))
                    {
                        //如果是托盘条码分解并模拟扫码
                        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 = "没有找到该条码!";
                        return null;
                    }
                }
                //一键扫码模式,根据条码前缀走 不同方法(仓库、仓位、部门)(源单、物料条码)
                else
                {
                    string sRedBlue = "蓝字";
                    if (HRedBlueFlag)
                    {
                        sRedBlue = "红字";
                    }
                    else
                    {
                        sRedBlue = "蓝字";
                    }
                    DataSet Dss;
                    //根据递入的条码前三位,判断条码类型(仓库、仓位、部门、源单、物料条码)
                    Dss = oCn.RunProcReturn(" select HSourceName,BarCodeType from Xt_BarCodeType where HSourceNumber= '" + sBarCode.Substring(0, 3) + "'", "Xt_BarCodeType");
                    //无返回数据则为物料条码
                    if (Dss == null || Dss.Tables[0].Rows.Count == 0)
                    if (oSystemParameter.omodel.WMS_CampanyName == "杭州智见" || oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") //系统参数  客户定制化名称     空白为通用
                    {
                        DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
                        if (dal.GetInfoByNumber_View(sBarCode))
@@ -29839,7 +29776,7 @@
                                            oBar.HSupID = sHSupID;
                                            oBar.HSupName = sHSupName;
                                            oBar.HDeptID = sHDeptID;
                                            oBar.HDeptName = sHDeptName;
                                            oBar.HDeptName = sHDeptName;
                                            SourceFlag = true;
                                        }
                                        else
@@ -29880,6 +29817,134 @@
                    }
                    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
                {
                    string sRedBlue = "蓝字";
                    if (HRedBlueFlag)
                    {
                        sRedBlue = "红字";
                    }
                    else
                    {
                        sRedBlue = "蓝字";
                    }
                    DataSet Dss;
                    //根据递入的条码前三位,判断条码类型(仓库、仓位、部门、源单、物料条码)
                    Dss = oCn.RunProcReturn(" select HSourceName,BarCodeType from Xt_BarCodeType where HSourceNumber= '" + sBarCode.Substring(0, 3) + "'", "Xt_BarCodeType");
                    //无返回数据则为物料条码
                    if (Dss == null || Dss.Tables[0].Rows.Count == 0)
                    {
                        if (oSystemParameter.omodel.WMS_CampanyName == "杭州智见" || oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") //系统参数  客户定制化名称     空白为通用
                        {
                            DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
                            if (dal.GetInfoByNumber_View(sBarCode))
                            {
                                //如果是托盘条码分解并模拟扫码
                                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 = "没有找到该条码!";
                                return null;
                            }
                        }
                        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
                    {
                        string sBarBillName = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["HSourceName"]);
                        string sBarBillType = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["BarCodeType"]);