分步式调入模块新增扫描源单调用方法、调拨模块扫描物料调用方法修改,四维尔采购入库上传方法改为调用新方法
2个文件已修改
123 ■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 123 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -23151,7 +23151,7 @@
            }
            if (oSystemParameter.omodel.Kf_POStockInBill_ERPMode.ToUpper() == "CLOUD")  //判断同步模式是金蝶CLOUD
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "卓力" || oSystemParameter.omodel.WMS_CampanyName == "韩电" || oSystemParameter.omodel.WMS_CampanyName == "四维尔" || oSystemParameter.omodel.WMS_CampanyName == "雅琪诺") //系统参数  客户定制化名称     空白为通用
                if (oSystemParameter.omodel.WMS_CampanyName == "卓力" || oSystemParameter.omodel.WMS_CampanyName == "韩电" || oSystemParameter.omodel.WMS_CampanyName == "雅琪诺") //系统参数  客户定制化名称     空白为通用
                {
                    if (set_SavePOStockInBill_CLD(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true)
                    {
@@ -23465,6 +23465,13 @@
                ") ");
                //更新关联数量
                oCn.RunProc("exec h_p_Cg_UpDateRelation_POInStockToPOStockIn_Add " + oMain.HInterID.ToString());
                //判断是否启用器具管理,系统参数  启用器具管理
                if (oSystemParameterMain.WMS_MouldManagerCtl == "Y")
                {
                    string HMouldBillType = "3803";
                    oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",1");
                }
                //根据TMP表 返回 信息
                DataSet Ds;
@@ -39936,6 +39943,68 @@
        #endregion
        #region 分步式调入    扫描源单条码
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_MoveStockStepIn(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockInOrgID, Int64 HStockOutOrgID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
            Int64 sMulSourceFlag = 0;       //多源单标志(0为非多源单模式,1为多源单模式)
            string sSourceBarCodeCtl = "N"; //是否进行源单对应条码核对('Y'为核对)
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBill(ref sErrMsg) == false)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg;
                return null;
            }
            //多源单模式
            if (oSystemParameter.omodel.Kf_MoveStockStepInBill_MulSourceBill.ToUpper() == "Y")
            {
                sMulSourceFlag = 1;
            }
            //是否进行源单对应条码核对('Y'为核对)
            if (oSystemParameter.omodel.Kf_MoveStockStepInBill_SourceBarCodeCtl.ToUpper() == "Y")
            {
                sSourceBarCodeCtl = "Y";
            }
            //将源单信息存入条码出入库临时表
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_MoveStockStepIn " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + sSourceBarCodeCtl + "','" + HMaker + "'," + HStockOutOrgID.ToString(), "h_p_WMS_AddSourceBarCode_MoveStockStepIn");
            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)
                {
                    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.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]);
                    oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]);
                    oBar.HStockOutOrgID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HStockOutOrgID"]);
                    oBar.HStockOutOrgName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HStockOutOrgName"]);
                    oBar.HStockInOrgID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HStockInOrgID"]);
                    oBar.HStockInOrgName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HStockInOrgName"]);
                    oBar.HStockStyle = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HStockStyle"]);
                    return oBar;
                }
                else
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                    return null;
                }
            }
        }
        #endregion
        #endregion
@@ -40664,11 +40733,6 @@
                if (oSystemParameterMain.Kf_MoveStockStepInBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
                //先进先出控制('Y'为控制)
                if (oSystemParameterMain.Kf_MoveStockStepInBill_FIFOCtl.ToUpper() == "Y")
                {
                    sFIFOCtl = "Y";
                }
                //是否启用多源单扫码模式('Y'为启用)
                if (oSystemParameterMain.Kf_MoveStockStepInBill_MulSourceBill.ToUpper() == "Y")
@@ -42160,6 +42224,22 @@
            DAL.ClsKF_PonderationBillMain_Temp_Ctl tem = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
            Model.ClsKF_PonderationBillMain_Temp oMain = new Model.ClsKF_PonderationBillMain_Temp();
            string sSourceBillCtl = "N";    //是否进行源单信息核对('Y'为核对源单信息)
            string sBatchNoCtl = "N";       //是否进行批号核对('Y'为核对批号)
            string sMultilineCtl = "N";     //是否存在多行相同物料时自动拆分换行('Y'为自动拆分)
            string sMustQtyCtl = "不控制";  //扫码数量能否可超单据数量控制(小于等于应收、完全等于应收、不控制)
            string sMaterWHSPCtl = "N";     //是否取物料默认仓库仓位('Y'为是)
            string sSourceWHSPCtl = "N";    //是否取源单中仓库仓位('Y'为是)
            string sOneScanCtl = "N";       //一次扫码控制('Y'为控制)
            string sFIFOCtl = "N";          //先进先出控制('Y'为控制)
            string sMulSourceCtl = "N";     //是否启用多源单扫码模式('Y'为启用)
            //根据单据类型,获取对应单据系统参数值
            if (get_SystemParameter_BarCode(HBillType, oSystemParameterMain, ref sSourceBillCtl, ref sBatchNoCtl, ref sMultilineCtl, ref sMustQtyCtl, ref sMaterWHSPCtl, ref sSourceWHSPCtl, ref sOneScanCtl, ref sFIFOCtl, ref sMulSourceCtl, ref sErrMsg))
            {
            }
            //判断调入仓库、仓位是否有效
            if (HWhID == 0)
            {
@@ -42224,18 +42304,17 @@
                    sRelQty = omodel_View.HQty;
                }
                //直接调拨 有源单扫码,根据系统参数:直接调拨-应收数量 控制扫码数量能否可超单据数量(小于等于应收、完全等于应收、不控制)
                if (HBillType == "1207" && omodel_View.HSourceInterID != 0
                    && (oSystemParameterMain.Kf_MoveStockBill_MustQtyCtl == "小于等于应收" || oSystemParameterMain.Kf_MoveStockBill_MustQtyCtl == "完全等于应收"))
                //有源单扫码,根据系统参数 控制扫码数量能否可超单据数量(小于等于应收、完全等于应收、不控制)
                if (omodel_View.HSourceInterID != 0 && (sMustQtyCtl == "小于等于应收" || sMustQtyCtl == "完全等于应收"))
                {
                    if (omodel_View.HSourceQty == 0)
                    {
                        sErrMsg = "所扫物料在单据中剩余可扫数量为0,不允许扫码!";
                        sErrMsg = "启用条码扫描数量不能超源单可扫数量,所扫物料在列表中剩余可扫数量为0,不允许扫码!";
                        return false;
                    }
                    else if (sRelQty > omodel_View.HSourceQty)
                    {
                        sErrMsg = "所扫描条码数量为 " + sRelQty.ToString() + " 大于对应源单剩余可扫描数量" + omodel_View.HSourceQty.ToString() + ",不允许扫码!";
                        sErrMsg = "启用条码扫描数量不能超源单可扫数量,所扫描条码数量为 " + sRelQty.ToString() + " 大于列表中剩余可扫描数量" + omodel_View.HSourceQty.ToString() + ",不允许扫码!";
                        return false;
                    }
                }
@@ -42256,18 +42335,17 @@
                    sRelQty = omodel_View.HQty;
                }
                //直接调拨 有源单扫码,根据系统参数:直接调拨校验-应收数量 控制扫码数量能否可超单据数量(小于等于应收、完全等于应收、不控制)
                if (HBillType == "1207" && omodel_View.HSourceInterID != 0
                    && (oSystemParameterMain.Kf_MoveStockBill_MustQtyCtl == "小于等于应收" || oSystemParameterMain.Kf_MoveStockBill_MustQtyCtl == "完全等于应收"))
                //有源单扫码,根据系统参数 控制扫码数量能否可超单据数量(小于等于应收、完全等于应收、不控制)
                if (omodel_View.HSourceInterID != 0 && (sMustQtyCtl == "小于等于应收" || sMustQtyCtl == "完全等于应收"))
                {
                    if (omodel_View.HSourceQty == 0)
                    {
                        sErrMsg = "所扫物料在单据中剩余可扫数量为0,不允许扫码!";
                        sErrMsg = "启用条码扫描数量不能超源单可扫数量,所扫物料在单据中剩余可扫数量为0,不允许扫码!";
                        return false;
                    }
                    else if (sRelQty > omodel_View.HSourceQty)
                    {
                        sErrMsg = "所扫描条码数量为 " + sRelQty.ToString() + " 大于对应源单剩余可扫描数量" + omodel_View.HSourceQty.ToString() + ",不允许扫码!";
                        sErrMsg = "启用条码扫描数量不能超源单可扫数量,所扫描条码数量为 " + sRelQty.ToString() + " 大于对应源单剩余可扫描数量" + omodel_View.HSourceQty.ToString() + ",不允许扫码!";
                        return false;
                    }
                }
@@ -42278,7 +42356,7 @@
            if (omodel_View.HBarCodeType == "唯一条码")
            {
                //判断条码库存    库存控制-WMS负库存控制
                if (oSystemParameterMain.WMS_WMSStockCtl == "Y")
                if (oSystemParameterMain.WMS_WMSStockCtl == "Y" && HBillType != "1251")
                {
                    //判断ERP库存   返回ERP库存数量
                    DataSet DsWMS = oCn.RunProcReturn("exec h_p_KF_ICInventory_WMS_GetWHAndSP " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HSCWHID.ToString() + "," + HSCSPID.ToString(), "h_p_KF_ICInventory_WMS_GetWHAndSP");
@@ -42324,7 +42402,7 @@
            }
            //判断ERP库存   库存控制-ERP负库存控制
            if (oSystemParameterMain.WMS_ERPStockCtl == "Y")
            if (oSystemParameterMain.WMS_ERPStockCtl == "Y" && HBillType != "1251")
            {
                //判断ERP库存   返回ERP库存数量
                DataSet DsERP = oCn.RunProcReturn("exec h_p_IF_CheckQtyByERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HSCWHID.ToString() + "," + HSCSPID.ToString() + "," + omodel_View.HMaterID.ToString() + "," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + sRelQty.ToString() + "," + HStockOutOrgID.ToString(), "h_p_IF_CheckQtyByERPICInventory");
@@ -42360,13 +42438,8 @@
                return false;
            }
            string sBillTypeOneScan = "";   //是否启用一次扫码控制('Y'为启用)
            if (HBillType == "1207" && oSystemParameterMain.Kf_MoveStockBill_BillTypeOneScan == "Y")
            {
                //直接调拨单
                sBillTypeOneScan = "Y";
            }
            if (sBillTypeOneScan == "Y")
            //唯一条码,是否启用一次扫码控制('Y'为启用)
            if (omodel_View.HBarCodeType == "唯一条码" && sOneScanCtl == "Y")
            {
                //一次扫码控制,同一条码、同一单据类型,在WMS表和TEMP表里,只允许进行一次扫码
                DataSet ds = oCn.RunProcReturn("exec h_p_WMS_CheckBarCodeOneScan " + HBillID.ToString() + ",'" + omodel_View.HBarCode + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWHID.ToString() + "," + HSCSPID.ToString() + ",'" + HMaker + "'", "h_p_WMS_CheckBarCodeOneScan");
DLL/Pub_Class.dll
Binary files differ