生产汇报、采购入库、生产入库、销售出库、领料出库、其他出库、直接调拨上传增加上传前控制
1个文件已修改
197 ■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 197 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -4229,6 +4229,22 @@
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            //上传前判断
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_ICMOReportBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + sHSourceType + "'," + oMain.HDeptID.ToString() + ",'" + oSystemParameter.omodel.Sc_ICMOReportBill_MustQtyCtl + "'", "h_p_WMS_BeforeUpload_ICMOReportBill");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "上传前判断数据完整性失败!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            //
            if (oSystemParameter.omodel.Sc_ICMOReportBill_ERPMode.ToUpper() == "WISE") //判断同步模式是金蝶WISE
            {
@@ -4236,7 +4252,7 @@
            }
            if (oSystemParameter.omodel.Sc_ICMOReportBill_ERPMode.ToUpper() == "CLOUD")  //判断同步模式是金蝶CLOUD
            {
            if (set_SaveICMOReportBill_CLD_New(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true)
                if (set_SaveICMOReportBill_CLD_New(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true)
                {
                    //"保存成功!";
                    return true;
@@ -4260,20 +4276,20 @@
        [WebMethod]
        public bool set_SaveICMOReportBill_CLD_New(Model.ClsSc_ICMOReportBillMain oMain, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        {
            //上传前判断是否存在相同条码
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet ds = oCn.RunProcReturn("exec h_p_WMS_UpLoadControl " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'", "h_p_WMS_UpLoadControl");
            if (ds == null || ds.Tables[0].Rows.Count == 0)
            {
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            ////上传前判断是否存在相同条码
            //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            //DataSet ds = oCn.RunProcReturn("exec h_p_WMS_UpLoadControl " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'", "h_p_WMS_UpLoadControl");
            //if (ds == null || ds.Tables[0].Rows.Count == 0)
            //{
            //}
            //else
            //{
            //    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
            //    {
            //        sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
            //        return false;
            //    }
            //}
            //if (sHSourceType == "3710")   //源单:生产订单
            //{
@@ -6411,7 +6427,22 @@
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            //上传前判断
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_MoveStockBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + sHSourceType + "'," + oMain.HDeptID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HKeeperID.ToString() + ",'" + oSystemParameter.omodel.Kf_MoveStockBill_MustQtyCtl + "'", "h_p_WMS_BeforeUpload_MoveStockBill");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "上传前判断数据完整性失败!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            //
            if (oSystemParameter.omodel.Kf_MoveStockBill_ERPMode.ToUpper() == "WISE") //判断同步模式是金蝶WISE
            {
@@ -9798,6 +9829,22 @@
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            //上传前判断
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_SellOutBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + sHSourceType + "'," + oMain.HDeptID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HKeeperID.ToString() + ",'" + oSystemParameter.omodel.Kf_SellOutBill_MustQtyCtl + "'", "h_p_WMS_BeforeUpload_SellOutBill");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "上传前判断数据完整性失败!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            //
            if (oSystemParameter.omodel.Kf_SellOutBill_ERPMode.ToUpper() == "WISE") //判断同步模式是金蝶WISE
            {
@@ -12231,6 +12278,22 @@
            {
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            //上传前判断
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_MateOutBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + sHSourceType + "'," + oMain.HDeptID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HKeeperID.ToString() + ",'" + oSystemParameter.omodel.Kf_MateOutBill_MustQtyCtl + "'", "h_p_WMS_BeforeUpload_MateOutBill");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "上传前判断数据完整性失败!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            //
            if (oSystemParameter.omodel.Kf_MateOutBill_ERPMode.ToUpper() == "WISE") //判断同步模式是金蝶WISE
@@ -14672,6 +14735,22 @@
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            //上传前判断
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_OtherOutBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + sHSourceType + "'," + oMain.HDeptID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HKeeperID.ToString() + ",'" + oSystemParameter.omodel.Kf_OtherOutBill_MustQtyCtl + "'", "h_p_WMS_BeforeUpload_OtherOutBill");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "上传前判断数据完整性失败!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            //
            if (oSystemParameter.omodel.Kf_OtherOutBill_ERPMode.ToUpper() == "WISE") //判断同步模式是金蝶WISE
            {
@@ -16219,6 +16298,22 @@
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            //上传前判断
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_POStockInBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + sHSourceType + "'," + oMain.HDeptID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HKeeperID.ToString() + ",'" + oSystemParameter.omodel.Kf_POStockInBill_MustQtyCtl + "'", "h_p_WMS_BeforeUpload_POStockInBill");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "上传前判断数据完整性失败!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            //
            if (oSystemParameter.omodel.Kf_POStockInBill_ERPMode.ToUpper() == "WISE") //判断同步模式是金蝶WISE
            {
@@ -17418,20 +17513,36 @@
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            //上传前判断是否存在相同条码
            //上传前判断
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet ds = oCn.RunProcReturn("exec h_p_WMS_UpLoadControl " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'", "h_p_WMS_UpLoadControl");
            if (ds == null || ds.Tables[0].Rows.Count == 0)
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_ProductInBill_MulSource " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'", "h_p_WMS_BeforeUpload_ProductInBill_MulSource");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "上传前判断数据完整性失败!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
                if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            ////上传前判断是否存在相同条码
            //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            //DataSet ds = oCn.RunProcReturn("exec h_p_WMS_UpLoadControl " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'", "h_p_WMS_UpLoadControl");
            //if (ds == null || ds.Tables[0].Rows.Count == 0)
            //{
            //}
            //else
            //{
            //    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
            //    {
            //        sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
            //        return false;
            //    }
            //}
            //产品入库单保存前进行倒冲仓负库存控制
            DataSet ds2 = oCn.RunProcReturn("exec h_p_IFCLD_CheckDaochong_Handian " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "'", "h_p_IFCLD_CheckDaochong_Handian");
@@ -18385,6 +18496,22 @@
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            //上传前判断
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_ProductInBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + sHSourceType + "'," + oMain.HDeptID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HKeeperID.ToString() + ",'" + oSystemParameter.omodel.Kf_ProductInBill_MustQtyCtl + "'", "h_p_WMS_BeforeUpload_ProductInBill");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "上传前判断数据完整性失败!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            //
            if (oSystemParameter.omodel.Kf_ProductInBill_ERPMode.ToUpper() == "WISE") //判断同步模式是金蝶WISE
            {
@@ -18601,20 +18728,20 @@
        [WebMethod]
        public bool set_SaveProductInBill_CLD_New(Model.ClsKf_ProductInBillMain oMain, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        {
            //上传前判断是否存在相同条码
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet ds = oCn.RunProcReturn("exec h_p_WMS_UpLoadControl " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'", "h_p_WMS_UpLoadControl");
            if (ds == null || ds.Tables[0].Rows.Count == 0)
            {
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            ////上传前判断是否存在相同条码
            //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            //DataSet ds = oCn.RunProcReturn("exec h_p_WMS_UpLoadControl " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'", "h_p_WMS_UpLoadControl");
            //if (ds == null || ds.Tables[0].Rows.Count == 0)
            //{
            //}
            //else
            //{
            //    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
            //    {
            //        sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
            //        return false;
            //    }
            //}
            if (sHSourceType == "3710")   //生产订单
            {