yxj
2023-10-27 7bdfa90aaa1388399234fdd213f65fca26ee0c9f
新增删托单扫码调用方法,新增客户四维尔扫描托条码功能
1个文件已修改
210 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 210 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -43719,7 +43719,24 @@
                Int64 sHDeptID = 0;
                string sHDeptName = "";
                string sHBarType = "";
                string sBarCode2 = "";
                sBarCode = sBarCode.Trim();
                if (sBarCode == "")
                {
                    sErrMsg = "条码不能为空,请扫描条码!";
                    return null;
                }
                else
                {
                    //判断条码是否含特殊符号 # ,如果含有则 拆分(# 前为条码编号;# 后如为数字,则默认递入数量为 #后显示的数量)
                    string[] NewBarCode;
                    if (sBarCode.Contains("#"))
                    {
                        NewBarCode = sBarCode.Split(Convert.ToChar("#"));
                        sBarCode2 = NewBarCode[0];
                    }
                    sBarCode2 = sBarCode;
                }
                string sBarCodePrefix = sBarCode.Substring(0, Math.Min(3, sBarCode.Length));//截取条码前三位字符串
                //获取系统参数
@@ -44066,6 +44083,61 @@
                                    }
                                }
                            }
                            else if(oSystemParameter.omodel.WMS_CampanyName == "四维尔")
                            {
                                DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
                                if (dal.GetInfoByBarCode_View(sBarCode2))
                                {
                                    if (dal.omodel_View.HStopflag)
                                    {
                                        sErrMsg = "条码已被禁用,不允许扫描!";
                                        return null;
                                    }
                                    else
                                    {
                                        //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码
                                        if (dal.omodel_View.HBarCodeType == "托盘条码")
                                        {
                                            //将托条码信息写入条码出入库临时表
                                            oBar = get_SavePonderationBillMain_Temp_PackBarCode(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, 0, 0, SourceFlag, HSourceBillType, HOWNERID, HOWNERID, HExpressNumber, "", oSystemParameter.omodel, ref sErrMsg);
                                            if (oBar == null)
                                            {
                                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                                return null;
                                            }
                                            else
                                            {
                                                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
                            {
                                //将物料条码信息写入出入库条码临时表
@@ -44215,6 +44287,61 @@
                                            sErrMsg = DBUtility.ClsPub.isStrNull(Mould.Tables[0].Rows[0]["HRemark"]);
                                            return null;
                                        }
                                    }
                                }
                                else if (oSystemParameter.omodel.WMS_CampanyName == "四维尔")
                                {
                                    DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
                                    if (dal.GetInfoByBarCode_View(sBarCode2))
                                    {
                                        if (dal.omodel_View.HStopflag)
                                        {
                                            sErrMsg = "条码已被禁用,不允许扫描!";
                                            return null;
                                        }
                                        else
                                        {
                                            //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码
                                            if (dal.omodel_View.HBarCodeType == "托盘条码")
                                            {
                                                //将托条码信息写入条码出入库临时表
                                                oBar = get_SavePonderationBillMain_Temp_PackBarCode(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, 0, 0, SourceFlag, HSourceBillType, HOWNERID, HOWNERID, HExpressNumber, "", oSystemParameter.omodel, ref sErrMsg);
                                                if (oBar == null)
                                                {
                                                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                                    return null;
                                                }
                                                else
                                                {
                                                    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
@@ -52497,6 +52624,62 @@
        #endregion
        #region 生产删托单模块调用方法     20231025新增
        #region 生产删托单模块 扫描托条码
        [WebMethod]
        public DataSet get_PackBarCode_DeletePackUnionBill(string HBarCode_Pack, string HHMaker, Int64 HStockOrgID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_DeletePackUnionBill '" + HBarCode_Pack + "','" + HHMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_DeletePackUnionBill");
            if (ds == null || ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "扫描托条码判断失败!";
                return null;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
                {
                    return ds;
                }
                else
                {
                    sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    return null;
                }
            }
        }
        #endregion
        #region 生产删托单模块 提交
        [WebMethod]
        public bool set_DeletePackUnionBill(Int64 HInterID, string HBillNo, string HBarCode_Pack, string HMaker, string HComputerName, string HIPAddress,string HModCaption, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            try
            {
                oCn.BeginTran();
                DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillNo + "','" + HBarCode_Pack + "','" + HMaker + "','" + HComputerName + "','" + HIPAddress + "','" + HModCaption + "'" , "h_p_Sc_PackUnionBill_Delete");
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sErrMsg = "删托失败!" + e.Message;
                oCn.RollBack();
                return false;
            }
        }
        #endregion
        #endregion
        #region 换托调拨单模块调用方法     20230531新增
        #region 换托调拨单模块 扫描调入托条码
@@ -53104,6 +53287,33 @@
        #region 缓存列表模块调用方法
        #region 编辑缓存列表单据调用
        //缓存列表界面,选择编辑时,判断所选单据是否存在已上传记录
        [WebMethod]
        public bool TempList_Modify_Pack(Int64 sHInterID, string sHBillNo, string sHBillType, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_TempList_Modify_Pack " + sHInterID + ",'" + sHBillNo + "','" + sHBillType + "'", "h_p_WMS_TempList_Modify_Pack");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "缓存列表编辑前判断失败,数据库连接失败!";
                return false;
            }
            if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 0)
            {
                return true;
            }
            else
            {
                sErrMsg = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                return false;
            }
        }
        #endregion
        #region 返回缓存列表信息
        [WebMethod]