新增校验模块同步单据按钮调用方法;校验模块扫描物料条码,增加参数是否校对仓库仓位功能
2个文件已修改
116 ■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 116 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -39124,7 +39124,7 @@
            #endregion
        #endregion
            //        #region 扫描物料条码调用方法
@@ -39480,9 +39480,9 @@
            //        #endregion
            #region 模具条码处理方法
        #region 模具条码处理方法
            #region 扫描模具源单条码
        #region 扫描模具源单条码
            [WebMethod]
        public Model.ClsKf_ICStockBill_Mould get_CheckTypeByMouldSource(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HHMaker, Int64 HOWNERID, ref string sErrMsg)
@@ -40305,15 +40305,15 @@
            Model.ClsKF_PonderationBillMain_Temp oMain = new Model.ClsKF_PonderationBillMain_Temp();
            double sRelQty = 0;
            string sBillTypeOneScan = "";   //是否启用一次扫码控制('Y'为启用)
            if (HBillType == "1207" && oSystemParameterMain.Kf_MoveStockBill_BillTypeOneScan == "Y")
            string sWHSPCtl = "Y";   //校验-是否校对仓库仓位('Y'为校对)
            if (HBillType == "1207" && oSystemParameterMain.Kf_MoveStockBillCheck_WHSPCtl == "N")
            {
                //直接调拨单
                sBillTypeOneScan = "Y";
                sWHSPCtl = "N";
            }
            //判断是否存在相同条码,判断所扫条码是否在单据中
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_MoveStockBillCheck '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + "," + HSCWHID + "," + HSCSPID + ",'" + sBillTypeOneScan + "'", "h_p_WMS_AddBarCode_MoveStockBillCheck");
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_MoveStockBillCheck '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + "," + HSCWHID + "," + HSCSPID + ",'" + sWHSPCtl + "'", "h_p_WMS_AddBarCode_MoveStockBillCheck");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "判断所扫条码是否在单据中发生错误!";
@@ -40462,11 +40462,11 @@
                }
                else
                {
                if (DBUtility.ClsPub.isLong(dsOneScan.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = DBUtility.ClsPub.isStrNull(dsOneScan.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
                    if (DBUtility.ClsPub.isLong(dsOneScan.Tables[0].Rows[0][0]) == 1)
                    {
                        sErrMsg = DBUtility.ClsPub.isStrNull(dsOneScan.Tables[0].Rows[0]["HRemark"]);
                        return false;
                    }
                }
            }
@@ -40525,25 +40525,25 @@
            Model.ClsKF_PonderationBillMain_Temp oMain = new Model.ClsKF_PonderationBillMain_Temp();
            double sRelQty = 0;
            string sBillTypeOneScan = "";   //是否启用一次扫码控制('Y'为启用)
            if (HBillType == "1203" && oSystemParameterMain.Kf_OtherInBill_BillTypeOneScan == "Y")
            string sWHSPCtl = "Y";   //校验-是否校对仓库仓位('Y'为校对)
            if (HBillType == "1203")
            {
                //其他入库单
                sBillTypeOneScan = "Y";
                sWHSPCtl = "Y";
            }
            else if (HBillType == "1204" && oSystemParameterMain.Kf_MateOutBill_BillTypeOneScan == "Y")
            else if (HBillType == "1204" && oSystemParameterMain.Kf_MateOutBillCheck_WHSPCtl == "N")
            {
                //领料出库单
                sBillTypeOneScan = "Y";
                sWHSPCtl = "N";
            }
            else if (HBillType == "1206" && oSystemParameterMain.Kf_OtherOutBill_BillTypeOneScan == "Y")
            else if (HBillType == "1206")
            {
                //其他出库单
                sBillTypeOneScan = "Y";
                sWHSPCtl = "Y";
            }
            //判断是否存在相同条码,判断是否启用一次扫码控制,判断所扫条码是否在单据中
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_BillCheck '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + ",'" + sBillTypeOneScan + "'", "h_p_WMS_AddBarCode_BillCheck");
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_BillCheck '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + ",'" + sWHSPCtl + "'", "h_p_WMS_AddBarCode_BillCheck");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "判断所扫条码是否在单据中发生错误!";
@@ -40558,6 +40558,8 @@
                    omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSourceEntryID"]);
                    omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSourceInterID"]);
                    omodel_View.HSourceQty = DBUtility.ClsPub.isDoule(ds1.Tables[0].Rows[0]["HQtyMust"]);     //源单可扫数量
                    HWhID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HWhID"]);
                    HSPID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSPID"]);
                }
                else
                {
@@ -40712,11 +40714,12 @@
                    DataSet DsWMS = oCn.RunProcReturn("exec h_p_KF_ICInventory_WMS_GetWHAndSP " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_KF_ICInventory_WMS_GetWHAndSP");
                    if (DsWMS == null || DsWMS.Tables[0].Rows.Count == 0)
                    {
                        sErrMsg = "判断WMS条码库存,发生错误!";
                        return false;
                        sRelQty = 0;
                    }
                    else
                    {
                        HWhID = DBUtility.ClsPub.isLong(DsWMS.Tables[0].Rows[0]["HWhID"]);
                        HSPID = DBUtility.ClsPub.isLong(DsWMS.Tables[0].Rows[0]["HSPID"]);
                        sWMSQty = DBUtility.ClsPub.isDoule(DsWMS.Tables[0].Rows[0]["HKFQty"]);
                        //判断扫描条码数量与条码库存数量
                        if(sRelQty> sWMSQty)
@@ -40763,6 +40766,25 @@
                {
                    sErrMsg = sErrMsg;
                    return false;
                }
            }
            //一次扫码控制,同一条码、同一单据类型,在WMS表和TEMP表里,只允许进行一次扫码
            if ((HBillType == "1203" && oSystemParameterMain.Kf_OtherInBill_BillTypeOneScan == "Y")
                || (HBillType == "1204" && oSystemParameterMain.Kf_MateOutBill_BillTypeOneScan == "Y")
                || (HBillType == "1206" && oSystemParameterMain.Kf_OtherOutBill_BillTypeOneScan == "Y"))
            {
                DataSet dsOneScan = oCn.RunProcReturn("exec h_p_WMS_CheckBarCodeOneScan_New '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + ",0,0,'" + HMaker + "'", "h_p_WMS_CheckBarCodeOneScan_New");
                if (dsOneScan == null || dsOneScan.Tables[0].Rows.Count == 0)
                {
                }
                else
                {
                    if (DBUtility.ClsPub.isLong(dsOneScan.Tables[0].Rows[0][0]) == 1)
                    {
                        sErrMsg = DBUtility.ClsPub.isStrNull(dsOneScan.Tables[0].Rows[0]["HRemark"]);
                        return false;
                    }
                }
            }
@@ -41131,6 +41153,56 @@
        #endregion
        #region 界面同步单据按钮调用方法    *校验模式
        [WebMethod]
        public bool set_UpdateTemp_BillCheck(Int64 HBillID, string HBillNo, string HBillType, string HMaker, Int64 HOWNERID, ref string sErrMsg)
        {
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBill(ref sErrMsg) == false)
            {
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            string sWHSPCtl = "Y";   //校验-是否校对仓库仓位('Y'为校对)
            if (HBillType == "1204" && oSystemParameter.omodel.Kf_MateOutBillCheck_WHSPCtl == "N")
            {
                //领料出库单
                sWHSPCtl = "N";
            }
            else if (HBillType == "1207" && oSystemParameter.omodel.Kf_MoveStockBillCheck_WHSPCtl == "N")
            {
                //直接调拨单
                sWHSPCtl = "N";
            }
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_UpdateTemp_BillCheck " + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HMaker + "'," + HOWNERID.ToString() + ",'" + sWHSPCtl + "'", "h_p_WMS_UpdateTemp_BillCheck");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "单据号:" + HBillNo + ";同步单据信息发生错误!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
                {
                    sErrMsg = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                    return true;
                }
                else
                {
                    sErrMsg = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
        }
        #endregion
        #region 缓存模块调用方法    *校验模式
        //缓存列表界面,返回缓存列表信息
DLL/Pub_Class.dll
Binary files differ