jhz
2023-05-04 260bf4a5fc73b40b7ed296b7b409602363408730
新增一键扫码,扫描源单条码调用方法
1个文件已修改
176 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -47087,7 +47087,7 @@
                else
                {
                    //根据递入的条码前三位,判断条码类型(仓库条码、仓位条码、部门条码、源单条码、物料条码)
                    DataSet Dss = oCn.RunProcReturn(" select HSourceName,BarCodeType from Xt_BarCodeType with(nolock) where HSourceNumber= '" + sBarCodePrefix + "'", "Xt_BarCodeType");
                    DataSet Dss = oCn.RunProcReturn(" select HSourceName,BarCodeType,HSourceBillType from Xt_BarCodeType with(nolock) where HSourceNumber= '" + sBarCodePrefix + "'", "Xt_BarCodeType");
                    //无返回数据则为物料条码
                    if (Dss == null || Dss.Tables[0].Rows.Count == 0)
@@ -47203,6 +47203,7 @@
                    {
                        string sBarBillName = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["HSourceName"]);
                        string sBarBillType = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["BarCodeType"]);
                        string sSourceBillType = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["HSourceBillType"]);
                        //判断条码类型为 基础资料条码 或 源单条码
                        if (sBarBillType == "基础资料条码")
@@ -47221,7 +47222,7 @@
                        //源单条码
                        else if (sBarBillType == "源单条码")
                        {
                            oBar = get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HStockOrgID, ref sErrMsg);
                            oBar = get_BillBarCode(HInterID, HBillNo, HBillType, sBarCode, sSourceBillType, HMaker, 0, 0, 0, HStockOrgID, oSystemParameter.omodel, ref sErrMsg);
                            if (oBar == null)
                            {
                                sErrMsg = "启用一键扫码模式," + sErrMsg;
@@ -47878,6 +47879,177 @@
        #endregion
        #region 一键扫码    扫描源单条码    返回源单信息
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_BillBarCode(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HStockOrgID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        {
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
            Int64 HAccessFlag = 0;   //是否物料条码带出源单信息标志(0为直接扫源单条码,1为物料条码带出源单信息)
            if (HBillType == "3711")
            {
                //生产汇报单
                oBar = get_SourceBill_ICMOReport(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1201")
            {
                //采购入库单
                oBar = get_SourceBill_POStockIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1202")
            {
                //生产入库单
                oBar = get_SourceBarCode_ProductIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1203")
            {
                //其他入库单
                oBar = get_SourceBarCode_OtherIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1210")
            {
                //委外入库单
                oBar = get_SourceBill_EntrustIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1204")
            {
                //生产领料单
                oBar = get_SourceBarCode_MateOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HPTQty, HPlanMode, HFIFOWhID, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1205")
            {
                //销售出库单
                oBar = get_SourceBarCode_SellOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1211")
            {
                //委外出库单
                oBar = get_SourceBarCode_EntrustOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1206")
            {
                //其他出库单
                oBar = get_SourceBarCode_OtherOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1207")
            {
                //直接调拨单
                oBar = get_SourceBarCode_MoveStock(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1250")
            {
                //分步式调出单
                oBar = get_SourceBarCode_MoveStockStepOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else if (HBillType == "1251")
            {
                //分步式调入单
                oBar = get_SourceBarCode_MoveStockStepIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else
            {
                sErrMsg = "单据类型错误!";
                return null;
            }
        }
        #endregion
        #region 扫描物料条码      调拨
        [WebMethod]