| | |
| | | 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 |
| | | { |
| | |
| | | } |
| | | 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; |
| | |
| | | [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") //源单:生产订单 |
| | | //{ |
| | |
| | | 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 |
| | | { |
| | |
| | | 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 |
| | | { |
| | |
| | | { |
| | | 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 |
| | |
| | | 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 |
| | | { |
| | |
| | | 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 |
| | | { |
| | |
| | | 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"); |
| | |
| | | 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 |
| | | { |
| | |
| | | [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") //生产订单 |
| | | { |