jhz
2022-11-27 f3cd0e49e7a9416516067857a2f71d3bbba1aabe
新增其他出库扫描源单方法
2个文件已修改
99 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -41816,6 +41816,95 @@
        #endregion
        #region 其他出库    扫描源单条码
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_OtherOut(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.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg;
                return null;
            }
            if (oSystemParameter.omodel.Kf_OtherOutBill_MulSourceBill.ToUpper() == "Y") //系统参数  其他出库单-多源单模式
            {
                sMulSourceFlag = 1;
            }
            //将源单信息存入条码出入库临时表
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_OtherOut " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_OtherOut");
            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_OtherOutBill_FIFOCtl == "Y")  //系统参数  其他出库单-先进先出控制
                    {
                        DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_OtherOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFO_OtherOut");
                        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;
                            }
                        }
                    }
                    //先进先出下架清单
                    else if (oSystemParameter.omodel.Kf_OtherOutBill_FIFOList == "Y")  //系统参数  其他出库单-先进先出下架清单
                    {
                        DataSet FIFOList = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFOList_OtherOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFOList_OtherOut");
                        if (FIFOList == null || FIFOList.Tables[0].Rows.Count == 0)
                        {
                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";存入先进先出下架清单失败!";
                            return null;
                        }
                        else
                        {
                            if (DBUtility.ClsPub.isLong(FIFOList.Tables[0].Rows[0][0]) == 1)
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(FIFOList.Tables[0].Rows[0]["HRemark"]);
                                return null;
                            }
                        }
                    }
                    oBar.HBarType = "源单条码";
                    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 直接调拨    扫描源单条码
        [WebMethod]
@@ -42555,6 +42644,16 @@
                {
                    sMulSourceCtl = "Y";
                }
                //先进先出控制('Y'为控制)
                if (oSystemParameterMain.Kf_OtherOutBill_FIFOCtl.ToUpper() == "Y")
                {
                    sFIFOCtl = "Y";
                }
                //是否启用多源单扫码模式('Y'为启用)
                if (oSystemParameterMain.Kf_OtherOutBill_MulSourceBill.ToUpper() == "Y")
                {
                    sMulSourceCtl = "Y";
                }
            }
            //委外出库单
            else if (HBillType == "1211")
DLL/Pub_Class.dll
Binary files differ