| | |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "同步单据失败!" + strErrorMsg; |
| | | //根据单据号,删除本地数据 |
| | | oCn.RunProc("Delete from Sc_ICMOBillMain where HBillNo='" + HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return false; |
| | | } |
| | | else |
| | |
| | | HISREWORK = _saveObj.SelectToken("Result.Result.IsRework")?.ToString().ToUpper() == "TRUE" ? 1 : 0, |
| | | }; |
| | | |
| | | //根据单据ID,删除本地数据 |
| | | //根据单据号、单据ID,删除本地数据 |
| | | oCn.RunProc("Delete from Sc_ICMOBillMain where HBillNo='" + MainData.HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Sc_ICMOBillMain where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Sc_ICMOBillSub where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "同步单据失败!" + strErrorMsg; |
| | | //根据单据号,删除本地数据 |
| | | oCn.RunProc("Delete from Cg_POOrderBillMain where HBillNo='" + HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return false; |
| | | } |
| | | else |
| | |
| | | HISPRICEEXCLUDETAX = _saveObj.SelectToken("Result.Result.POOrderFinance[0].FISPRICEEXCLUDETAX")?.ToString().ToUpper() == "TRUE" ? 1 : 0, |
| | | }; |
| | | |
| | | //根据单据ID,删除本地数据 |
| | | //根据单据号、单据ID,删除本地数据 |
| | | oCn.RunProc("Delete from Cg_POOrderBillMain where HBillNo='" + MainData.HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Cg_POOrderBillMain where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Cg_POOrderBillSub where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | //获取系统参数 |
| | | string sCampanyName = ""; //客户定制化名称 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | { |
| | | sCampanyName = oSystemParameter.omodel.WMS_CampanyName; //系统参数 客户定制化名称 空白为通用 |
| | | } |
| | | |
| | | //从配置文件获取 CLOUD网址、账套信息、登录用户、登录密码 |
| | | if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo)) |
| | | { |
| | |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "同步单据失败!" + strErrorMsg; |
| | | //根据单据号,删除本地数据 |
| | | oCn.RunProc("Delete from Xs_SeOutStockbillMain where HBillNo='" + HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return false; |
| | | } |
| | | else |
| | |
| | | HEXCHANGERATE = _saveObj.SelectToken("Result.Result.SAL_DELIVERYNOTICEFIN[0].ExchangeRate")?.ToString() ?? "0", |
| | | HISINCLUDEDTAX = _saveObj.SelectToken("Result.Result.SAL_DELIVERYNOTICEFIN[0].IsIncludedTax")?.ToString().ToUpper() == "TRUE" ? 1 : 0, |
| | | HISPRICEEXCLUDETAX = _saveObj.SelectToken("Result.Result.SAL_DELIVERYNOTICEFIN[0].IsPriceExcludeTax")?.ToString().ToUpper() == "TRUE" ? 1 : 0, |
| | | F_XLBH_Base_apv = _saveObj.SelectToken("Result.Result.F_XLBH_Base_apv.Number")?.ToString() ?? "", //小卫 收货仓库 |
| | | }; |
| | | |
| | | //根据单据ID,删除本地数据 |
| | | //根据单据号、单据ID,删除本地数据 |
| | | oCn.RunProc("Delete from Xs_SeOutStockbillMain where HBillNo='" + MainData.HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Xs_SeOutStockbillMain where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Xs_SeOutStockbillSub where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | //定义客户主表自定义字段 |
| | | string MainCustom1 = ""; |
| | | string MainCustom2 = ""; |
| | | if (sCampanyName == "小卫") |
| | | { |
| | | MainCustom1 = ",F_XLBH_Base_apv"; |
| | | MainCustom2 = ",'" + MainData.F_XLBH_Base_apv + "'"; |
| | | } |
| | | |
| | | //插入主表 |
| | | oCn.RunProc("Insert Into Xs_SeOutStockbillMain " + |
| | |
| | | ",HRECCONTACTID,HRECCONTACTNumber,HRECCONTACTName,HRECEIPTCONDITIONID,HRECEIPTCONDITIONNumber,HCORRESPONDORGID" + |
| | | ",HCARRIAGENO,HSTOCKERNumber,HSALESMANNumber,HLOCALCURRNumber,HSETTLECURRNumber,HEXCHANGETYPENumber" + |
| | | ",HSETTLETYPENumber" + |
| | | MainCustom1+ |
| | | ") " + |
| | | " values(" + MainData.HInterID.ToString() + "," + MainData.HYear.ToString() + "," + MainData.HPeriod.ToString() + ",'" + MainData.HBillType + "','" + MainData.HBillSubType + "','" + MainData.HDate + "'" + |
| | | ",'" + MainData.HBillNo + "'," + MainData.HBillStatus.ToString() + |
| | |
| | | ", " + MainData.HRECCONTACTID.ToString() + ",'" + MainData.HRECCONTACTNumber + "','" + MainData.HRECCONTACTName + "'," + MainData.HRECEIPTCONDITIONID.ToString() + ",'" + MainData.HRECEIPTCONDITIONNumber + "'," + MainData.HCORRESPONDORGID.ToString() + |
| | | ",'" + MainData.HCARRIAGENO + "','" + MainData.HSTOCKERNumber + "','" + MainData.HSALESMANNumber + "','" + MainData.HLOCALCURRNumber + "','" + MainData.HSETTLECURRNumber + "','" + MainData.HEXCHANGETYPENumber + "'" + |
| | | ",'" + MainData.HSETTLETYPENumber + "'" + |
| | | MainCustom2 + |
| | | ") "); |
| | | |
| | | //子表数据赋值 |
| | |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "同步单据失败!" + strErrorMsg; |
| | | //根据单据号,删除本地数据 |
| | | oCn.RunProc("Delete from Xs_SeOutStockBackBillMain where HBillNo='" + HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return false; |
| | | } |
| | | else |
| | |
| | | HISPRICEEXCLUDETAX = _saveObj.SelectToken("Result.Result.SAL_RETURNNOTICEFIN[0].IsPriceExcludeTax")?.ToString().ToUpper() == "TRUE" ? 1 : 0, |
| | | }; |
| | | |
| | | //根据单据ID,删除本地数据 |
| | | //根据单据号、单据ID,删除本地数据 |
| | | oCn.RunProc("Delete from Xs_SeOutStockBackBillMain where HBillNo='" + MainData.HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Xs_SeOutStockBackBillMain where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Xs_SeOutStockBackbillSub where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "同步单据失败!" + strErrorMsg; |
| | | //根据单据号,删除本地数据 |
| | | oCn.RunProc("Delete from Sc_PPBomBillMain where HBillNo='" + HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return false; |
| | | } |
| | | else |
| | |
| | | HICMOEntrySEQ = _saveObj.SelectToken("Result.Result.MOEntrySeq")?.ToString() ?? "0", |
| | | }; |
| | | |
| | | //根据单据ID,删除本地数据 |
| | | //根据单据号、单据ID,删除本地数据 |
| | | oCn.RunProc("Delete from Sc_PPBomBillMain where HBillNo='" + MainData.HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Sc_PPBomBillMain where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Sc_PPBomBillSub where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "同步单据失败!" + strErrorMsg; |
| | | //根据单据号,删除本地数据 |
| | | oCn.RunProc("Delete from WW_PPBomBillMain where HBillNo='" + HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return false; |
| | | } |
| | | else |
| | |
| | | HREQSRC = _saveObj.SelectToken("Result.Result.ReqSrc")?.ToString() ?? "", |
| | | }; |
| | | |
| | | //根据单据ID,删除本地数据 |
| | | //根据单据号、单据ID,删除本地数据 |
| | | oCn.RunProc("Delete from WW_PPBomBillMain where HBillNo='" + MainData.HBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from WW_PPBomBillMain where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from WW_PPBomBillSub where HInterID=" + MainData.HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "同步单据失败!" + strErrorMsg; |
| | | //根据单据号,删除本地数据 |
| | | oCn.RunProc("Delete from Kf_ICStockBillMain where HBillNo='" + HBillNo + "' and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return false; |
| | | } |
| | | else |
| | |
| | | else |
| | | { |
| | | HInterID = DBUtility.ClsPub.isLong(dsID.Tables[0].Rows[0]["HInterID"]); |
| | | //根据单据号、单据ID,删除本地数据 |
| | | oCn.RunProc("Delete from Kf_ICStockBillMain where HBillNo='" + HBillNo + "' and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Kf_ICStockBillMain where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Kf_ICStockBillSub where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "同步单据失败!" + strErrorMsg; |
| | | //根据单据号,删除本地数据 |
| | | oCn.RunProc("Delete from Kf_ICStockBillMain where HBillNo='" + HBillNo + "' and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return false; |
| | | } |
| | | else |
| | |
| | | else |
| | | { |
| | | HInterID = DBUtility.ClsPub.isLong(dsID.Tables[0].Rows[0]["HInterID"]); |
| | | //根据单据号、单据ID,删除本地数据 |
| | | oCn.RunProc("Delete from Kf_ICStockBillMain where HBillNo='" + HBillNo + "' and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Kf_ICStockBillMain where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("Delete from Kf_ICStockBillSub where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetICMOReportBill_ICMO_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetICMOReportBill_ICMO_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetICMOReportBill_ICMO_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetICMOReportBill_ICMO_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetICMOReportBill_ICMO_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetICMOReportBill_ICMO_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetICMOReportBill_ICMO_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetICMOReportBill_ICMO_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetICMOReportBill_ICMO_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetICMOReportBill_ICMO_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetICMOReportBill_ICMO_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetICMOReportBill_ICMO_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PPBom_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PPBom_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PPBom_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PPBom_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_WWPPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_WWPPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_WWPPBom_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_WWPPBom_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_WWPPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_WWPPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_WWPPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_WWPPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_WWPPBom_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_WWPPBom_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_WWPPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_WWPPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_SeOutStock_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_SeOutStock_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_SeOutStock_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_SeOutStock_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_SeOutStock_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_SeOutStock_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_SeOutStock_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_SeOutStock_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_SeOutStock_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_SeOutStock_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_SeOutStock_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_SeOutStock_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MoveStockRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MoveStockRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MoveStockRequest_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MoveStockRequest_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MoveStockRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MoveStockRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MoveStockRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MoveStockRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MoveStockRequest_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MoveStockRequest_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MoveStockRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MoveStockRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_StockOutRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_StockOutRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_StockOutRequest_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_StockOutRequest_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_StockOutRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_StockOutRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_StockOutRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_StockOutRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_StockOutRequest_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_StockOutRequest_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_StockOutRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_StockOutRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MateOutRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MateOutRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MateOutRequest_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MateOutRequest_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MateOutRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MateOutRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MateOutRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MateOutRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MateOutRequest_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MateOutRequest_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_MateOutRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_MateOutRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PrepareMTRL_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PrepareMTRL_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PrepareMTRL_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PrepareMTRL_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PrepareMTRL_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PrepareMTRL_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PrepareMTRL_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PrepareMTRL_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PrepareMTRL_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PrepareMTRL_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockBill_PrepareMTRL_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockBill_PrepareMTRL_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveOutBill_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveOutBill_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveOutBill_SPPUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveOutBill_SPPUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveOutBill_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveOutBill_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveOutBill_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveOutBill_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveOutBill_SPCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveOutBill_SPCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveOutBill_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveOutBill_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_MoveStockRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_SeOutStock_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_SeOutStock_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_SeOutStock_SPPUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_SeOutStock_SPPUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_SeOutStock_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_SeOutStock_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_SeOutStock_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_SeOutStock_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_SeOutStock_SPCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_SeOutStock_SPCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_SeOutStock_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_SeOutStock_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_SPPUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_SPPUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_SPCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_SPCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepOutBill_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepOutBill_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_SPPUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_SPPUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_SPCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_SPCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMoveStockStepInBill_MoveStockStepOut_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOutStockBack_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOutStockBack_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOutStockBack_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOutStockBack_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOutStockBack_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOutStockBack_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOutStockBack_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOutStockBack_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOutStockBack_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOutStockBack_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOutStockBack_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOutStockBack_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOrder_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOrder_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOrder_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOrder_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOrder_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOrder_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOrder_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOrder_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOrder_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOrder_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBackBill_SeOrder_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBackBill_SeOrder_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOrder_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOrder_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOrder_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOrder_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOrder_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOrder_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOrder_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOrder_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOrder_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOrder_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOrder_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOrder_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOutStock_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOutStock_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOutStock_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOutStock_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOutStock_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOutStock_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOutStock_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOutStock_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOutStock_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOutStock_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_SeOutStock_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_SeOutStock_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_PPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_PPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_PPBom_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_PPBom_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_PPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_PPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_PPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_PPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_PPBom_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_PPBom_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_PPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_PPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_MateOut_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_MateOut_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_MateOut_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_MateOut_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_MateOut_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_MateOut_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_MateOut_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_MateOut_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_MateOut_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_MateOut_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBill_MateOut_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBill_MateOut_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | LogService.Write("生成生产退料单(源单:生产领料单)成功!" + sRemark); |
| | | sErrMsg = "生成生产退料单成功!单据号为:" + oMain.HBillNo; |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 生产退料 生产领料(红字) 校验模式* |
| | | |
| | | //校验生产退料单 |
| | | [WebMethod] |
| | | public bool set_SaveMateOutBackBill_BillCheck(Model.ClsKf_ICStockBillMain oMain, ref string sErrMsg) |
| | | { |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(oMain.HSTOCKORGID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | return false; |
| | | } |
| | | //WMS系统同步至ERP的类型(WISE、CLOUD、MES) |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_ERPMode.ToUpper() == "WISE") |
| | | { |
| | | sErrMsg = "暂无此功能!"; |
| | | return false; |
| | | } |
| | | else if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_ERPMode.ToUpper() == "CLOUD") |
| | | { |
| | | //免扫物料条码模式(只扫描源单进行审核,不扫描物料条码) |
| | | //原单据为扫码生成,对原扫描的条码进行核对 |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_AutoBarCode == "Y" |
| | | || oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | if (set_SaveMateOutBackBill_CLD_BillCheck_Verify(oMain, oSystemParameter.omodel, ref sErrMsg) == true) |
| | | { |
| | | //上传成功 |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //上传失败 |
| | | sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";上传单据失败!" + sErrMsg; |
| | | return false; |
| | | } |
| | | } |
| | | //原单据非扫码生成 |
| | | else |
| | | { |
| | | if (set_SaveMateOutBackBill_CLD_BillCheck(oMain, oSystemParameter.omodel, ref sErrMsg) == true) |
| | | { |
| | | //上传成功 |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //上传失败 |
| | | sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";上传单据失败!" + sErrMsg; |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | else if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_ERPMode.ToUpper() == "WMS") //只生成WMS单据 |
| | | { |
| | | //免扫物料条码模式(只扫描源单进行审核,不扫描物料条码) |
| | | //原单据为扫码生成,对原扫描的条码进行核对 |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_AutoBarCode == "Y" |
| | | || oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sErrMsg = "暂不支持扫码生成单据的校验功能!"; |
| | | return false; |
| | | } |
| | | //原单据非扫码生成 |
| | | else |
| | | { |
| | | if (set_SaveMateOutBackBill_WMS_BillCheck(oMain, oSystemParameter.omodel, ref sErrMsg) == true) |
| | | { |
| | | //上传成功 |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //上传失败 |
| | | sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";上传单据失败!" + sErrMsg; |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "WMS系统同步至ERP的类型对应系统参数设置错误!"; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //CLOUD 原单据非扫码生成 |
| | | private bool set_SaveMateOutBackBill_CLD_BillCheck(Model.ClsKf_ICStockBillMain oMain, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | //上传前判断 |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_MateOutBackBillCheck " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + oSystemParameterMain.Kf_MateOutBackBillCheck_MustQtyCtl + "'", "h_p_WMS_BeforeUpload_MateOutBackBillCheck"); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //写入条码出入库表 |
| | | oCn.RunProc("EXEC h_p_Kf_ICStockBillSub_WMS_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + oMain.HBillNo + "'"); |
| | | |
| | | //从配置文件获取 CLOUD网址、账套信息、登录用户、登录密码 |
| | | if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo)) |
| | | { |
| | | sErrMsg = Pub_Class.ClsPub.sExeReturnInfo; |
| | | return false; |
| | | } |
| | | |
| | | //获取CLOUD账号密码 |
| | | string sCLOUDUseName = Pub_Class.ClsPub.sCLOUDUseName; |
| | | string sCLOUDPsd = Pub_Class.ClsPub.sCLOUDPsd; |
| | | |
| | | //从用户表获取用户绑定金蝶账号 |
| | | DataSet ds11 = oCn.RunProcReturn("exec h_p_API_GetCloudUserByLoginUser '" + oMain.HMaker + "'", "h_p_API_GetCloudUserByLoginUser"); |
| | | if (ds11 == null || ds11.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | sCLOUDUseName = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserName"]); |
| | | sCLOUDPsd = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserPsd"]); |
| | | } |
| | | |
| | | if (oSystemParameterMain.Kf_MateOutBackBillCheck_MustQtyCtl == "完全等于应收") |
| | | { |
| | | string HReturn; |
| | | ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl); |
| | | string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117 |
| | | bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052); |
| | | if (bLogin) |
| | | { |
| | | //提交单据 |
| | | string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit", |
| | | new object[] { "PRD_ReturnMtrl", sJson2 }); |
| | | //审核单据 |
| | | string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit", |
| | | new object[] { "PRD_ReturnMtrl", sJson3 }); |
| | | |
| | | HReturn = result3.ToString(); |
| | | |
| | | if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | { |
| | | //反序列化json数据 |
| | | var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(HReturn); |
| | | //接收金蝶报错信息 |
| | | var strErrorMsg = string.Empty; |
| | | //遍历获取报错信息 |
| | | foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | { |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "校验审核生产退料单失败!金蝶云提示:" + strErrorMsg; |
| | | LogService.Write("校验审核生产退料单失败!" + HReturn); //写入txt文本 |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "审核生产退料单成功!单据号为:" + oMain.HBillNo; |
| | | LogService.Write("校验审核生产退料单成功!单据号为:" + oMain.HBillNo); //写入txt文本 |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "校验审核生产退料单失败!金蝶云登录失败!"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //根据TMP表 返回 修改信息 |
| | | DataSet Ds2; |
| | | Ds2 = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBackBillCheck " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBackBillCheck"); |
| | | if (Ds2 == null || Ds2.Tables[0].Rows.Count == 0 || Ds2.Tables[1].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "获取子表信息失败!"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[\"FEntity\",\"FQty\"]," + |
| | | "\"NeedReturnFields\":[],\"IsDeleteEntry\":\"false\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | | "\"Model\":{ \"FID\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[0].Rows[0]["FID"]) + "\"," + |
| | | "\"FEntity\":["; |
| | | string sJson_Entry = ""; |
| | | for (int i = 0; i < Ds2.Tables[1].Rows.Count; i++) |
| | | { |
| | | if (sJson_Entry != "") |
| | | { |
| | | sJson_Entry = sJson_Entry + " , "; |
| | | } |
| | | |
| | | sJson_Entry = sJson_Entry + "{" + |
| | | "\"FEntryID\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FEntryID"]) + "\"," + |
| | | "\"FQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FQty"]) + "\" " + |
| | | "}"; |
| | | } |
| | | string sJson_End = " ] }}"; |
| | | string sJson = sJson_Main + sJson_Entry + sJson_End; |
| | | |
| | | //验证用户信息 |
| | | string HReturn; |
| | | ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl); |
| | | string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117 |
| | | bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052); |
| | | if (bLogin) |
| | | { |
| | | //修改单据 |
| | | var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save", |
| | | new object[] { "PRD_ReturnMtrl", sJson }); |
| | | |
| | | HReturn = result.ToString(); |
| | | |
| | | if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | { |
| | | //反序列化json数据 |
| | | var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(HReturn); |
| | | //接收金蝶报错信息 |
| | | var strErrorMsg = string.Empty; |
| | | //遍历获取报错信息 |
| | | foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | { |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "校验修改生产退料单失败!金蝶云提示:" + strErrorMsg; |
| | | LogService.Write("校验修改生产退料单失败!" + HReturn + sJson); //写入txt文本 |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | HReturn = ""; |
| | | //提交单据 |
| | | string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit", |
| | | new object[] { "PRD_ReturnMtrl", sJson2 }); |
| | | //审核单据 |
| | | string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit", |
| | | new object[] { "PRD_ReturnMtrl", sJson3 }); |
| | | |
| | | HReturn = result3.ToString(); |
| | | |
| | | if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | { |
| | | //反序列化json数据 |
| | | var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(HReturn); |
| | | //接收金蝶报错信息 |
| | | var strErrorMsg = string.Empty; |
| | | //遍历获取报错信息 |
| | | foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | { |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "校验审核生产退料单失败!金蝶云提示:" + strErrorMsg; |
| | | LogService.Write("校验审核生产退料单失败!" + HReturn + sJson); //写入txt文本 |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | //重新同步生产退料单 |
| | | oCn.RunProc("exec h_p_IFCLD_ERPSourceBillToLocal_MateOutBack '" + oMain.HBillNo + "'"); |
| | | sErrMsg = "修改并审核生产退料单成功!单据号为:" + oMain.HBillNo; |
| | | LogService.Write("校验修改并审核生产退料单成功!单据号为:" + oMain.HBillNo); //写入txt文本 |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "校验审核生产退料单失败!金蝶云登录失败!"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "校验审核生产退料单失败!" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //CLOUD 免扫物料条码模式(只扫描源单进行审核,不扫描物料条码) |
| | | //CLOUD 原单据为扫码生成,对原扫描的条码进行核对 |
| | | private bool set_SaveMateOutBackBill_CLD_BillCheck_Verify(Model.ClsKf_ICStockBillMain oMain, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | //上传前判断 |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_MateOutBackBillCheck_Verify " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + oSystemParameterMain.Kf_MateOutBackBillCheck_AutoBarCode + "'", "h_p_WMS_BeforeUpload_MateOutBackBillCheck_Verify"); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //写入出入库校验表、条码出入库校验表 |
| | | oCn.RunProc("EXEC h_p_Kf_ICStockBillSub_WMS_Verify_Insert " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + oMain.HBillNo + "','" + oSystemParameterMain.Kf_MateOutBackBillCheck_AutoBarCode + "'"); |
| | | |
| | | //从配置文件获取 CLOUD网址、账套信息、登录用户、登录密码 |
| | | if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo)) |
| | | { |
| | | sErrMsg = Pub_Class.ClsPub.sExeReturnInfo; |
| | | return false; |
| | | } |
| | | |
| | | //获取CLOUD账号密码 |
| | | string sCLOUDUseName = Pub_Class.ClsPub.sCLOUDUseName; |
| | | string sCLOUDPsd = Pub_Class.ClsPub.sCLOUDPsd; |
| | | |
| | | //从用户表获取用户绑定金蝶账号 |
| | | DataSet ds11 = oCn.RunProcReturn("exec h_p_API_GetCloudUserByLoginUser '" + oMain.HMaker + "'", "h_p_API_GetCloudUserByLoginUser"); |
| | | if (ds11 == null || ds11.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | sCLOUDUseName = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserName"]); |
| | | sCLOUDPsd = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserPsd"]); |
| | | } |
| | | |
| | | //金蝶云审核单据 |
| | | string HReturn; |
| | | ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl); |
| | | string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117 |
| | | bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052); |
| | | if (bLogin) |
| | | { |
| | | //提交单据 |
| | | string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit", |
| | | new object[] { "PRD_ReturnMtrl", sJson2 }); |
| | | //审核单据 |
| | | string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit", |
| | | new object[] { "PRD_ReturnMtrl", sJson3 }); |
| | | |
| | | HReturn = result3.ToString(); |
| | | |
| | | if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | { |
| | | //反序列化json数据 |
| | | var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(HReturn); |
| | | //接收金蝶报错信息 |
| | | var strErrorMsg = string.Empty; |
| | | //遍历获取报错信息 |
| | | foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | { |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "校验审核生产退料单失败!金蝶云提示:" + strErrorMsg; |
| | | LogService.Write("校验审核生产退料单失败!" + HReturn); //写入txt文本 |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "校验审核生产退料单成功!单据号为:" + oMain.HBillNo; |
| | | LogService.Write("校验审核生产退料单成功!单据号为:" + oMain.HBillNo); //写入txt文本 |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "校验审核生产退料单失败!金蝶云登录失败!"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "校验审核生产退料单失败!" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //WMS 原单据非扫码生成 只生成WMS单据 |
| | | private bool set_SaveMateOutBackBill_WMS_BillCheck(Model.ClsKf_ICStockBillMain oMain, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | //上传前判断 |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_MateOutBackBillCheck_WMS " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + oSystemParameterMain.WMS_WMSStockCtl_ERPMode + "'", "h_p_WMS_BeforeUpload_MateOutBackBillCheck_WMS"); |
| | | 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 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //写入条码出入库表 |
| | | oCn.RunProc("EXEC h_p_Kf_ICStockBillSub_WMS_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + oMain.HBillNo + "'"); |
| | | |
| | | sErrMsg = "校验生产退料单成功!单据号为:" + oMain.HBillNo; |
| | | LogService.Write("校验生产退料单成功!单据号为:" + oMain.HBillNo); //写入txt文本 |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "校验生产退料单失败!" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PPBom_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PPBom_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PPBom_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PPBom_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_MateOutRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_MateOutRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_MateOutRequest_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_MateOutRequest_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_MateOutRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_MateOutRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_MateOutRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_MateOutRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_MateOutRequest_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_MateOutRequest_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_MateOutRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_MateOutRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PrepareMTRL_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PrepareMTRL_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PrepareMTRL_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PrepareMTRL_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PrepareMTRL_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PrepareMTRL_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PrepareMTRL_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PrepareMTRL_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PrepareMTRL_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PrepareMTRL_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateOutBill_PrepareMTRL_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateOutBill_PrepareMTRL_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateReplenishOutBill_PPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateReplenishOutBill_PPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateReplenishOutBill_PPBom_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateReplenishOutBill_PPBom_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateReplenishOutBill_PPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetMateReplenishOutBill_PPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateReplenishOutBill_PPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'," + oMain.HOWNERID.ToString(), "h_p_Kf_GetMateReplenishOutBill_PPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateReplenishOutBill_PPBom_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'," + oMain.HOWNERID.ToString(), "h_p_Kf_GetMateReplenishOutBill_PPBom_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateReplenishOutBill_PPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'," + oMain.HOWNERID.ToString(), "h_p_Kf_GetMateReplenishOutBill_PPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBackBill_WWPPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBackBill_WWPPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBackBill_WWPPBom_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBackBill_WWPPBom_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBackBill_WWPPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBackBill_WWPPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBackBill_WWPPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBackBill_WWPPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBackBill_WWPPBom_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBackBill_WWPPBom_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBackBill_WWPPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBackBill_WWPPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBill_WWPPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBill_WWPPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBill_WWPPBom_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBill_WWPPBom_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBill_WWPPBom_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBill_WWPPBom_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBill_WWPPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBill_WWPPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBill_WWPPBom_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBill_WWPPBom_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetEntrustOutBill_WWPPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetEntrustOutBill_WWPPBom_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 测试test |
| | | [WebMethod] |
| | | public bool set_Bill_New(Model.ClsCg_POOrderBillMain oMain, string sHSourceType, ref string sErrMsg) |
| | | { |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (set_Bill_CLD(oMain, oSystemParameter.omodel, ref sErrMsg) == true) |
| | | { |
| | | //"保存成功!"; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //"保存失败!"; |
| | | return false; |
| | | } |
| | | } |
| | | public bool set_Bill_CLD(Model.ClsCg_POOrderBillMain oMain, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | #region 固定代码 |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | string sRemark = ""; |
| | | //从配置文件获取 CLOUD网址、账套信息、登录用户、登录密码 |
| | | if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo)) |
| | | { |
| | | sErrMsg = Pub_Class.ClsPub.sExeReturnInfo; |
| | | return false; |
| | | } |
| | | |
| | | //获取CLOUD账号密码 |
| | | string sCLOUDUseName = Pub_Class.ClsPub.sCLOUDUseName; |
| | | string sCLOUDPsd = Pub_Class.ClsPub.sCLOUDPsd; |
| | | |
| | | //从用户表获取用户绑定金蝶账号 |
| | | DataSet ds11 = oCn.RunProcReturn("exec h_p_API_GetCloudUserByLoginUser '" + oMain.HMaker + "'", "h_p_API_GetCloudUserByLoginUser"); |
| | | if (ds11 == null || ds11.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | sCLOUDUseName = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserName"]); |
| | | sCLOUDPsd = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserPsd"]); |
| | | } |
| | | |
| | | string HReturn; |
| | | ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl); |
| | | string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117 |
| | | bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052); |
| | | |
| | | sRemark = sRemark + " ;获取验证CLOUD账号密码" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | #endregion |
| | | try |
| | | { |
| | | DataSet Ds; |
| | | oCn.BeginTran(); |
| | | #region mes的语句插入(先注释,后面需要再用) |
| | | ////写入WMS其他出库单 |
| | | |
| | | ////插入子表 |
| | | //oCn.RunProc("EXEC h_p_Kf_OtherOutBillSub_Insert " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'"); |
| | | ////插入主表 |
| | | //oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | //"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" + |
| | | //",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | //",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | //",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | //",HStockStyle" + |
| | | //",HSTOCKORGID,HOWNERID" + |
| | | //") " + |
| | | //" values('1206','1206'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | //",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | //", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | //", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | //",'" + oMain.HStockStyle + "'" + |
| | | //", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | | //") "); |
| | | //更新关联数量 |
| | | #endregion |
| | | DateTime billDate; |
| | | string dateValue; |
| | | sRemark = sRemark + " ;生成出采购单据" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | string billTypeCode = "CGDD01_SYS"; |
| | | //todo |
| | | Ds = oCn.RunProcReturn("select HNumber SupNumber FROM Gy_Supplier where HItemID=" + oMain.HSupID, "Gy_Supplier"); |
| | | if (DateTime.TryParse(Pub_Class.ClsPub.isStrNull(oMain.HDate), out billDate)) |
| | | { |
| | | dateValue = billDate.ToString("yyyy-MM-dd"); |
| | | } |
| | | else |
| | | { |
| | | dateValue = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | } |
| | | string billNo = oMain.HBillNo; |
| | | string supplierNumber = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["SupNumber"]); |
| | | string purchaseOrgNumber ="100";//100 |
| | | //string settleCurrId = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HPSStyleID"]); |
| | | string sJson_StockStyle = ""; |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_StockStyle = ""; |
| | | sJson_Date = "\"FDate\":\"" + dateValue + "\","; |
| | | string sJson_Main = "{" + |
| | | "\"Creator\":\"\"," + |
| | | "\"NeedUpDateFields\":[]," + |
| | | "\"NeedReturnFields\":[]," + |
| | | "\"IsDeleteEntry\":\"true\"," + |
| | | "\"SubSystemId\":\"\"," + |
| | | "\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"true\"," + |
| | | "\"ValidateFlag\":\"true\"," + |
| | | "\"NumberSearch\":\"true\"," + |
| | | "\"IsAutoAdjustField\":\"false\"," + |
| | | "\"InterationFlags\":\"\"," + |
| | | "\"IgnoreInterationFlag\":\"\"," + |
| | | "\"Model\":{" + |
| | | "\"FID\":0," + |
| | | "\"FBillTypeID\":{\"FNUMBER\":\"" + billTypeCode + "\"}," + |
| | | "\"FBillNo\":\"" + billNo + "\"," + |
| | | "\"FDate\":\"" + dateValue + "\"," + |
| | | "\"FPurchaseOrgId\":{\"FNumber\":\"" + purchaseOrgNumber + "\"}," + |
| | | //TODO 这里供应商ID要和金蝶匹配上 |
| | | "\"FSupplierId\":{\"FNumber\":\"" + supplierNumber + "\"}," + |
| | | |
| | | "\"FPurchaseDeptId\":{\"FNumber\":\"\"}," + |
| | | "\"FPurchaserGroupId\":{\"FNumber\":\"\"}," + |
| | | "\"FPurchaserId\":{\"FNumber\":\"\"}," + |
| | | "\"FProviderId\":{\"FNumber\":\"\"}," + |
| | | "\"FProviderContactId\":{\"FCONTACTNUMBER\":\"\"}," + |
| | | "\"FProviderAddress\":\"\"," + |
| | | "\"FSettleId\":{\"FNumber\":\"\"}," + |
| | | "\"FChargeId\":{\"FNumber\":\"\"}," + |
| | | "\"FConfirmerId\":{\"FUserID\":\"\"}," + |
| | | "\"FConfirmDate\":\"1900-01-01\"," + |
| | | "\"FCorrespondOrgId\":{\"FNumber\":\"\"}," + |
| | | "\"FProviderContact\":\"\"," + |
| | | "\"FIsModificationOperator\":\"false\"," + |
| | | "\"FChangeStatus\":\"\"," + |
| | | "\"FACCTYPE\":\"\"," + |
| | | "\"F_RCZU_JXS\":\"\"," + |
| | | "\"FPOOrderFinance\":{" + |
| | | "\"FEntryId\":0," + |
| | | "\"FSettleModeId\":{\"FNumber\":\"JSFS01_SYS\"}," + |
| | | "\"FPayConditionId\":{\"FNumber\":\"\"}," + |
| | | "\"FSettleCurrId\":{\"FNumber\":\"" + "PRE001" + "\"}," + |
| | | "\"FExchangeTypeId\":{\"FNumber\":\"\"}," + |
| | | "\"FExchangeRate\":1," + |
| | | "\"FPriceListId\":{\"FNumber\":\"JGB01_SYS\"}," + |
| | | "\"FDiscountListId\":{\"FNumber\":\"\"}," + |
| | | "\"FPriceTimePoint\":\"\"," + |
| | | "\"FFOCUSSETTLEORGID\":{\"FNumber\":\"\"}," + |
| | | "\"FIsIncludedTax\":\"false\"," + |
| | | "\"FISPRICEEXCLUDETAX\":\"false\"," + |
| | | "\"FLocalCurrId\":{\"FNumber\":\"\"}," + |
| | | "\"FPayAdvanceBillId\":{}," + |
| | | "\"FPAYADVANCEAMOUNT\":0," + |
| | | "\"FSupToOderExchangeBusRate\":0," + |
| | | "\"FSEPSETTLE\":\"false\"," + |
| | | "\"FDepositRatio\":0" + |
| | | "}," + |
| | | "\"FPOOrderClause\":[]," + |
| | | "\"FPOOrderEntry\":["; |
| | | |
| | | string sJson_Entry = ""; |
| | | DataSet dds = oCn.RunProcReturn("select HNumber FROM Gy_Material where HItemID =" + oMain.HEmpID, "Gy_Material"); |
| | | |
| | | // 检查是否有明细数据 |
| | | if (dds == null || dds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "采购订单没有明细数据"; |
| | | return false; |
| | | } |
| | | |
| | | for (int i = 0; i < dds.Tables[0].Rows.Count; i++) |
| | | { |
| | | if (sJson_Entry != "") |
| | | { |
| | | sJson_Entry = sJson_Entry + " , "; |
| | | } |
| | | |
| | | // 从数据库获取字段值 |
| | | string materialId = Pub_Class.ClsPub.isStrNull(dds.Tables[0].Rows[i]["HNumber"]); |
| | | //string unitId = Pub_Class.ClsPub.isStrNull(dds.Tables[0].Rows[i]["UnitNumber"]); |
| | | //string quantity = Pub_Class.ClsPub.isStrNull(dds.Tables[0].Rows[i]["HQty"]); |
| | | //string price = Pub_Class.ClsPub.isStrNull(dds.Tables[0].Rows[i]["HPrice"]); |
| | | //string taxRate = Pub_Class.ClsPub.isStrNull(dds.Tables[0].Rows[i]["HTaxRate"]); |
| | | //string orgnumber = Pub_Class.ClsPub.isStrNull(dds.Tables[0].Rows[i]["orgnumber"]); |
| | | |
| | | // 验证必填字段 |
| | | if (string.IsNullOrEmpty(materialId)) |
| | | { |
| | | sErrMsg = $"第{i + 1}行物料编码为空"; |
| | | return false; |
| | | } |
| | | |
| | | // 设置默认值 |
| | | string unitId = "Pcs"; |
| | | string quantity = "1"; |
| | | string price = "0"; |
| | | string taxRate = "13"; |
| | | |
| | | // 转换数据类型 |
| | | decimal qty = 1; |
| | | if (!decimal.TryParse(quantity, out qty)) qty = 1; |
| | | |
| | | decimal priceValue = 0; |
| | | if (!decimal.TryParse(price, out priceValue)) priceValue = 0; |
| | | |
| | | decimal taxRateValue = 13; |
| | | if (!decimal.TryParse(taxRate, out taxRateValue)) taxRateValue = 13; |
| | | |
| | | // 交货日期默认为当前日期 |
| | | string deliveryDate = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | |
| | | // 构建分录JSON - 只包含最简单测试通过的字段 |
| | | sJson_Entry += "{" + |
| | | "\"FEntryID\":" + i + "," + // 从0开始递增 |
| | | "\"FMaterialId\":{\"FNumber\":\"" + materialId + "\"}," + |
| | | "\"FUnitId\":{\"FNumber\":\"" + unitId + "\"}," + |
| | | "\"FQty\":" + qty.ToString("0.########") + "," + |
| | | "\"FPriceUnitId\":{\"FNumber\":\"" + unitId + "\"}," + |
| | | "\"FPrice\":" + priceValue.ToString("0.########") + "," + |
| | | "\"FTaxRate\":" + taxRateValue.ToString("0.########") + "," + |
| | | "\"FDeliveryDate\":\"" + deliveryDate + "\"," + |
| | | // "\"FEntrySettleOrgId\":{\"FNumber\":\"" + orgnumber + "\"}," + |
| | | "\"FEntrySettleOrgId\":{\"FNumber\":\"100\"}," + |
| | | "\"FStockUnitID\":{\"FNumber\":\"" + unitId + "\"}" + |
| | | "}"; |
| | | } |
| | | //"\"FInStockEntry_Link_FSId\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInStockEntry_Link_FSId"]) + |
| | | string sJson_End = " ] }}"; |
| | | // 测试分录 该数据可以跑通 |
| | | string testEntry = "{" + |
| | | "\"FEntryID\":0," + |
| | | "\"FMaterialId\":{\"FNumber\":\"1.01.001.0001\"}," + |
| | | "\"FUnitId\":{\"FNumber\":\"Pcs\"}," + |
| | | "\"FQty\":1," + |
| | | "\"FPriceUnitId\":{\"FNumber\":\"Pcs\"}," + |
| | | "\"FPrice\":100," + |
| | | "\"FTaxRate\":13," + |
| | | "\"FDeliveryDate\":\"" + DateTime.Now.ToString("yyyy-MM-dd") + "\"," + |
| | | "\"FEntrySettleOrgId\":{\"FNumber\":\"100\"}," + |
| | | "\"FStockUnitID\":{\"FNumber\":\"Pcs\"}" + |
| | | "}"; |
| | | |
| | | // sJson_Entry = testEntry; |
| | | string sJson = sJson_Main + sJson_Entry + sJson_End; |
| | | |
| | | sRemark = sRemark + " ;获取CLOUD单据API递入值" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | //生成金蝶云单据 |
| | | if (bLogin) |
| | | { |
| | | var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save", |
| | | new object[] { "PUR_PurchaseOrder", sJson }); |
| | | |
| | | sRemark = sRemark + " ;生成CLOUD单据" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | LogService.Write(result.ToString()); |
| | | HReturn = result.ToString(); |
| | | |
| | | if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | { |
| | | //反序列化json数据 |
| | | var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(HReturn); |
| | | //接收金蝶报错信息 |
| | | var strErrorMsg = string.Empty; |
| | | //遍历获取报错信息 |
| | | foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | { |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | } |
| | | ; |
| | | sErrMsg = "生成采购单失败!金蝶云提示:" + strErrorMsg; |
| | | //oCn.RunProc("delete from Cg_POOrderBillMain where HInterID=" + oMain.HInterID); |
| | | //oCn.RunProc("delete from Cg_POOrderBillSub where HInterID=" + oMain.HInterID); |
| | | LogService.Write("生成采购单单(源单:无源单)失败-旧方法!" + HReturn + sJson); //写入txt文本 |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | sRemark = sRemark + sJson; |
| | | oCn.Commit(); |
| | | } |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "生成采购单失败!登录失败!"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | //oCn.RunProc("delete from Cg_POOrderBillMain where HInterID="+oMain.HInterID); |
| | | //oCn.RunProc("delete from Cg_POOrderBillSub where HInterID=" + oMain.HInterID); |
| | | LogService.Write("生成回滚" + e.Message + sRemark); |
| | | sErrMsg = "生成采购单失败!" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | #region 单据同步后自动审核,暂时没做 |
| | | |
| | | //oSystemParameterMain.Cg_POOrderBill_AutoCheck.ToUpper() == "Y" |
| | | //if (true) //系统参数 自动审核 |
| | | //{ |
| | | // try |
| | | // { |
| | | // oCn.BeginTran(); |
| | | // //审核WMS单据 |
| | | // //oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | // //提交、审核金蝶云单据 |
| | | // HReturn = ""; |
| | | // string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | // var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit", |
| | | // new object[] { "PUR_PurchaseOrder", sJson2 }); |
| | | |
| | | // sRemark = sRemark + " ;提交CLOUD单据" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | // string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | // var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit", |
| | | // new object[] { "PUR_PurchaseOrder", sJson3 }); |
| | | |
| | | // sRemark = sRemark + " ;审核CLOUD单据" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | // HReturn = result2.ToString() + "," + result3.ToString(); |
| | | |
| | | // if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | // { |
| | | // //反序列化json数据 |
| | | // var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(result3); |
| | | // //接收金蝶报错信息 |
| | | // var strErrorMsg = string.Empty; |
| | | // //遍历获取报错信息 |
| | | // foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | // { |
| | | // strErrorMsg += item.Message + "\r\n"; |
| | | // } |
| | | // ; |
| | | // sErrMsg = "生成其他出库单成功,审核单据失败!金蝶云提示:" + strErrorMsg; |
| | | // LogService.Write("审核单据失败" + sRemark + HReturn); |
| | | // oCn.RollBack(); |
| | | // return true; |
| | | // } |
| | | // else |
| | | // { |
| | | // LogService.Write("生成并审核其他出库单(源单:无源单)成功-旧方法!" + sRemark); |
| | | // sErrMsg = "生成并审核其他出库单成功!单据号为:" + oMain.HBillNo; |
| | | // oCn.Commit(); |
| | | // return true; |
| | | // } |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // LogService.Write("审核回滚" + sRemark + HReturn); |
| | | // sErrMsg = "审核其他出库单失败!" + e.Message; |
| | | // oCn.RollBack(); |
| | | // return false; |
| | | // } |
| | | //} |
| | | ////todo Cg_POOrderBill_AutoCheck这里应该有点问题 |
| | | //else if (oSystemParameterMain.Cg_POOrderBill_AutoCheck.ToUpper() == "Y") //系统参数 自动提交 |
| | | //{ |
| | | // try |
| | | // { |
| | | // oCn.BeginTran(); |
| | | // //提交金蝶云单据 |
| | | // HReturn = ""; |
| | | // string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | // var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit", |
| | | // new object[] { "STK_MisDelivery", sJson2 }); |
| | | |
| | | // sRemark = sRemark + " ;提交CLOUD单据" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | // HReturn = result2.ToString(); |
| | | |
| | | // if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | // { |
| | | // //反序列化json数据 |
| | | // var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(HReturn); |
| | | // //接收金蝶报错信息 |
| | | // var strErrorMsg = string.Empty; |
| | | // //遍历获取报错信息 |
| | | // foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | // { |
| | | // strErrorMsg += item.Message + "\r\n"; |
| | | // } |
| | | // ; |
| | | // sErrMsg = "生成其他出库单成功,提交单据失败!金蝶云提示:" + strErrorMsg; |
| | | // LogService.Write("提交单据失败" + sRemark + HReturn); |
| | | // oCn.RollBack(); |
| | | // return true; |
| | | // } |
| | | // else |
| | | // { |
| | | // LogService.Write("生成并提交其他出库单(源单:无源单)成功-旧方法!" + sRemark); |
| | | // sErrMsg = "生成并提交其他出库单成功!单据号为:" + oMain.HBillNo; |
| | | // oCn.Commit(); |
| | | // return true; |
| | | // } |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // LogService.Write("提交回滚" + sRemark + HReturn); |
| | | // sErrMsg = "提交其他出库单失败!" + e.Message; |
| | | // oCn.RollBack(); |
| | | // return false; |
| | | // } |
| | | //} |
| | | //else |
| | | //{ |
| | | // sErrMsg = "生成其他出库单成功!单据号为:" + oMain.HBillNo; |
| | | // return true; |
| | | //} |
| | | #endregion |
| | | } |
| | | #endregion |
| | | #region 报废单生成其他出库单 |
| | | //生成其他出库单 |
| | | [WebMethod] |
| | | public bool set_SaveOtherOutBill_New_haicheng(Model.ClsKf_OtherOutBillMain oMain, string sHSourceType, ref string sErrMsg) |
| | | { |
| | | if (set_SaveOtherOutBill_CLD_New_haicheng(oMain, sHSourceType, ref sErrMsg) == true) |
| | | { |
| | | //"保存成功!"; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //"保存失败!"; |
| | | return false; |
| | | } |
| | | } |
| | | //其他出库 |
| | | [WebMethod] |
| | | public bool set_SaveOtherOutBill_CLD_New_haicheng(Model.ClsKf_OtherOutBillMain oMain, string sHSourceType, ref string sErrMsg) |
| | | { |
| | | if (SaveOtherOutBill_CLD_haicheng(oMain, sHSourceType, ref sErrMsg)) |
| | | { |
| | | //"保存成功!"; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //"保存失败!"; |
| | | sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + sErrMsg; |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | | public bool SaveOtherOutBill_CLD_haicheng(Model.ClsKf_OtherOutBillMain oMain, string sHSourceType, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | string sRemark = ""; |
| | | //从配置文件获取 CLOUD网址、账套信息、登录用户、登录密码 |
| | | if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo)) |
| | | { |
| | | sErrMsg = Pub_Class.ClsPub.sExeReturnInfo; |
| | | return false; |
| | | } |
| | | |
| | | //获取CLOUD账号密码 |
| | | string sCLOUDUseName = Pub_Class.ClsPub.sCLOUDUseName; |
| | | string sCLOUDPsd = Pub_Class.ClsPub.sCLOUDPsd; |
| | | |
| | | //从用户表获取用户绑定金蝶账号 |
| | | DataSet ds11 = oCn.RunProcReturn("exec h_p_API_GetCloudUserByLoginUser '" + oMain.HMaker + "'", "h_p_API_GetCloudUserByLoginUser"); |
| | | if (ds11 == null || ds11.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | sCLOUDUseName = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserName"]); |
| | | sCLOUDPsd = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserPsd"]); |
| | | } |
| | | |
| | | string HReturn; |
| | | ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl); |
| | | string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117 |
| | | bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052); |
| | | |
| | | sRemark = sRemark + " ;获取验证CLOUD账号密码" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | try |
| | | { |
| | | //判断会计期是否合理 |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | |
| | | oMain.HDate = DateTime.Today; |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | | return false; |
| | | } |
| | | oMain.HYear = sYear; |
| | | oMain.HPeriod = sPeriod; |
| | | |
| | | oCn.BeginTran(); |
| | | |
| | | |
| | | string mainSql = @" |
| | | SELECT |
| | | org.HNumber FStockOrgId, |
| | | gd.HNumber FDeptId, |
| | | deptOrg.HNumber AS FDeptOrgNumber, |
| | | ma.* |
| | | FROM Sc_MouldStockBillMain ma WITH(NOLOCK) |
| | | LEFT JOIN Xt_ORGANIZATIONS org WITH(NOLOCK) on ma.HStockOrgID=org.HItemID |
| | | LEFT JOIN Gy_Department gd WITH(NOLOCK) on ma.HDeptID=gd.HItemID |
| | | LEFT JOIN Xt_ORGANIZATIONS deptOrg WITH(NOLOCK) ON gd.HCREATEORGID = deptOrg.HItemID |
| | | WHERE HInterID = " + oMain.HInterID; |
| | | |
| | | string detailSql = @" |
| | | SELECT |
| | | w.hnumber FStockId, |
| | | gu.hnumber FUnitID, |
| | | HEntryID FEntryID, |
| | | gm.hnumber FMaterialId, |
| | | sa.* |
| | | FROM Sc_MouldStockBillSub sa WITH(NOLOCK) |
| | | LEFT JOIN Gy_MouldFileMain gmf WITH(NOLOCK) on sa.hmaterid=gmf.HInterID |
| | | LEFT JOIN Gy_Material gm WITH(NOLOCK) on gmf.HMaterID=gm.hitemid |
| | | LEFT JOIN Gy_Unit gu WITH(NOLOCK) on sa.hunitid=gu.hitemid |
| | | LEFT JOIN gy_Warehouse w WITH(NOLOCK) on sa.HWhID=w.HItemID |
| | | WHERE sa.HInterID = " + oMain.HInterID; |
| | | |
| | | DataSet Ds = oCn.RunProcReturn(mainSql, "Sc_MouldStockBillMain"); |
| | | DataSet dds = oCn.RunProcReturn(detailSql, "Sc_MouldStockBillSub"); |
| | | |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "获取子表信息失败!"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | string sJson_StockStyle = ""; |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_BillTypeID = ""; //单据类型 |
| | | string sJson_Date = ""; //单据日期 |
| | | //todo |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(""); |
| | | |
| | | |
| | | sJson_BillTypeID = "\"FBillTypeID\":{ \"FNumber\":\"" + "QTCKD01_SYS" + "\" },"; |
| | | |
| | | |
| | | |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")) + "\","; |
| | | sJson_StockStyle = ""; |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\",\"IsEntryBatchFill\":\"True\",\"Model\":{ \"FBillNo\":\"" + oMain.HBillNo + "\"," + |
| | | //\"FID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FID"]) + "\"," + |
| | | sJson_BillTypeID + |
| | | "\"FStockOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDeptOrgNumber"] ) + "\"}," + |
| | | //"\"FStockOrgId\":{\"FNumber\":\"" + "101.1" + "\"}," + |
| | | "\"FPickOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDeptOrgNumber"]) + "\"}," + |
| | | //"\"FPickOrgId\":{\"FNumber\":\"" + "101.1" + "\"}," + |
| | | "\"FStockDirect\":\"" + "GENERAL" + "\"," + |
| | | sJson_Date + |
| | | //"\"FCustId\":{\"FNumber\":\"" + oMain.HSupplyID.ToString() + "\"}," + |
| | | "\"FDeptId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDeptId"]) + "\"}," + |
| | | "\"FPickerId\":{\"FSTAFFNUMBER\":\"" + "ZXM001_GW000004_100041" + "\"}," + |
| | | "\"FStockerId\":{\"FName\":\"" + "" + "\"}," + |
| | | "\"FStockerGroupId\":{\"FNumber\":\"" + "" + "\"}," + |
| | | "\"FBizType\":\"" + "0" + "\"," + |
| | | "\"FOwnerTypeIdHead\":\"" + "BD_OwnerOrg" + "\"," + |
| | | "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDeptOrgNumber"]) + "\"}," + |
| | | "\"FNote\":\"" + "" + "\"," + |
| | | "\"FBaseCurrId\":{\"FNumber\":\"" + "PRE001" + "\"}," + |
| | | "\"FScanBox\":\"" + "" + "\"," + |
| | | sJson_StockStyle + |
| | | sJson_MainCustom + |
| | | "\"FEntity\":["; |
| | | string sJson_Entry = ""; |
| | | for (int i = 0; i < dds.Tables[0].Rows.Count; i++) |
| | | { |
| | | if (sJson_Entry != "") |
| | | { |
| | | sJson_Entry = sJson_Entry + " , "; |
| | | } |
| | | string sJson_BatchNo = ""; |
| | | string sJson_StockPlace = ""; |
| | | string sJson_FProduceDate = ""; //生产日期 |
| | | string sJson_FExpiryDate = ""; //有效期至 |
| | | string sJson_FAUXPROPID = ""; |
| | | string sJson_SubCustom = ""; //子表自定义字段 |
| | | |
| | | //子表自定义字段 |
| | | sJson_SubCustom = ""; |
| | | sJson_BatchNo = ""; |
| | | |
| | | |
| | | sJson_FProduceDate = ""; |
| | | sJson_FExpiryDate = ""; |
| | | |
| | | |
| | | sJson_StockPlace = ""; |
| | | |
| | | |
| | | |
| | | string orgnumber = "101.1"; |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + "" + "\"}},"; |
| | | #region |
| | | sJson_Entry = sJson_Entry + "{\"FEntryID\":\"" + "0" + "\"," + |
| | | "\"FMaterialId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(dds.Tables[0].Rows[i]["FMaterialId"]) + "\"}," + |
| | | //"\"FMaterialId\":{\"FNumber\":\"" + "3.01.00007" + "\"}," + |
| | | sJson_FAUXPROPID + |
| | | |
| | | "\"FUnitID\":{\"FNumber\":\"" + "Pcs" + "\"}," + |
| | | "\"FQty\":" + "1" + "," + |
| | | "\"FPrice\":0," + |
| | | "\"FAmount\":0," + |
| | | "\"FBaseQty\":1," + |
| | | "\"FBaseUnitId\":{\"FNumber\":\"" + "Pcs" + "\"}," + |
| | | "\"FStockId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(dds.Tables[0].Rows[i]["FStockId"]) + "\"}," + |
| | | sJson_StockPlace + |
| | | //"\"FStockLocId\":{\"FSTOCKLOCID__FF100002\":{\"FNUMBER\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) + "\"}}," + |
| | | sJson_BatchNo + |
| | | "\"FPRODUCTGROUPID\":{\"FNumber\":\"" + "" + "\"}," + |
| | | "\"FOWNERTYPEID\":\"" + "BD_OwnerOrg" + "\"," + |
| | | "\"FOwnerId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDeptOrgNumber"] ?? "101.3") + "\"}," + |
| | | //"\"FOwnerId\":{\"FNumber\":\"" + orgnumber + "\"}," + |
| | | //sJson_FProduceDate + |
| | | //sJson_FExpiryDate + |
| | | //"\"FServiceContext\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FServiceContext"]) + "," + |
| | | "\"FStockStatusId\":{\"FNumber\":\"" + "KCZT01_SYS" + "\"}," + |
| | | //"\"FMtoNo\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMtoNo"]) + "," + |
| | | //"\"FCostItem\":{\"FNumber\":\"" + "" + "\"}," + |
| | | "\"FKeeperTypeId\":\"" + "BD_KeeperOrg" + "\"," + |
| | | //"\"FDistribution\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FDistribution"]) + "," + |
| | | "\"FKeeperId\":{\"FNumber\":\"" + orgnumber + "\"}," + |
| | | //sJson_SubCustom + |
| | | "\"FExtAuxUnitId\":{\"FNumber\":\"" + "Pcs" + "\"}," + |
| | | "\"FStockUnitId\":{\"FNumber\":\"" + "Pcs" + "\"}," + |
| | | "\"FExtAuxUnitQty\":" + "1" + "} "; |
| | | |
| | | } |
| | | //"\"FInStockEntry_Link_FSId\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInStockEntry_Link_FSId"]) + |
| | | #endregion |
| | | |
| | | string sJson_End = " ] }}"; |
| | | string sJson = sJson_Main + sJson_Entry + sJson_End; |
| | | |
| | | sRemark = sRemark + " ;获取CLOUD单据API递入值" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | //生成金蝶云单据 |
| | | if (bLogin) |
| | | { |
| | | var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save", |
| | | new object[] { "STK_MisDelivery", sJson }); |
| | | |
| | | sRemark = sRemark + " ;生成CLOUD单据" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | HReturn = result.ToString(); |
| | | //LogService.Write("报错内容:/n", HReturn); |
| | | //LogService.Write("报错内容:", sJson_Entry); |
| | | if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | { |
| | | //反序列化json数据 |
| | | var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(HReturn); |
| | | //接收金蝶报错信息 |
| | | var strErrorMsg = string.Empty; |
| | | //遍历获取报错信息 |
| | | foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | { |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "生成其他出库单失败!金蝶云提示:" + strErrorMsg; |
| | | LogService.Write("生成其他出库单(源单:无源单)失败!" + HReturn +"\n"+ sJson); //写入txt文本 |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | sRemark = sRemark + sJson; |
| | | oCn.Commit(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "生成其他出库单失败!金蝶云登录失败!"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write("生成回滚" + e.Message + sRemark); |
| | | sErrMsg = "生成其他出库单失败!" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | #endregion |
| | | |
| | | #region 其他出库 * |
| | | |
| | | //生成其他出库单 |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_StockOutRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_StockOutRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_StockOutRequest_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_StockOutRequest_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_StockOutRequest_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_StockOutRequest_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_StockOutRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_StockOutRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_StockOutRequest_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_StockOutRequest_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_StockOutRequest_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_StockOutRequest_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_SPPUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_SPPUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_SPCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_SPCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherOutBill_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherOutBill_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POOrder_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POOrder_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POOrder_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POOrder_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POOrder_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POOrder_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POOrder_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POOrder_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POOrder_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POOrder_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POOrder_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POOrder_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POInStockBack_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POInStockBack_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POInStockBack_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POInStockBack_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POInStockBack_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POInStockBack_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POInStockBack_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POInStockBack_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POInStockBack_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POInStockBack_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POInStockBack_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POInStockBack_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POStockIn_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POStockIn_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POStockIn_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POStockIn_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POStockIn_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POStockIn_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POStockIn_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POStockIn_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POStockIn_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POStockIn_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBackBill_POStockIn_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBackBill_POStockIn_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 外购入库单 (源单:收料通知单) |
| | | /// </summary> |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POOrder_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POOrder_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POOrder_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POOrder_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POOrder_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POOrder_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POOrder_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POOrder_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POOrder_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POOrder_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POOrder_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POOrder_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMO_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMO_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMO_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMO_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMO_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMO_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMO_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMO_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMO_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMO_SPCLD_New"); |
| | | sRemark = sRemark + " ;私有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMO_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMO_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMOReport_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMOReport_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMOReport_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMOReport_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMOReport_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMOReport_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMOReport_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMOReport_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMOReport_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMOReport_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ICMOReport_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ICMOReport_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ProcessReport_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ProcessReport_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ProcessReport_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ProcessReport_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ProcessReport_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ProcessReport_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ProcessReport_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ProcessReport_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ProcessReport_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ProcessReport_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetProductInBill_ProcessReport_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetProductInBill_ProcessReport_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_SPPUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_SPPUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_PUBCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_PUBCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_SPCLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_SPCLD_New"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetPOStockInBill_POInStock_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetPOStockInBill_POInStock_CLD_New"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherInBill_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherInBill_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherInBill_SPPUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherInBill_SPPUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherInBill_PUBCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherInBill_PUBCLD"); |
| | | sRemark = sRemark + " ;公有云模式"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherInBill_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherInBill_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | if (oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") //系统参数 仓位是否从ERP同步(N为仓位数据本地维护,Y为仓位数据从ERP中同步至本地) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherInBill_SPCLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherInBill_SPCLD"); |
| | | sRemark = sRemark + " ;公有云模式-仓位本地维护"; |
| | | } |
| | | else |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherInBill_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherInBill_CLD"); |
| | | sRemark = sRemark + " ;私有云模式"; |
| | | } |
| | | } |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | |
| | | #endregion |
| | | |
| | | #region 单据缓存列表 *整理后 |
| | | |
| | | #region 金蝶云单据查询 |
| | | [WebMethod] |
| | | public bool GetBillQuery_WMS(Int64 HInterID, string HBillNo, string HBillType, string HMaker, string sCloudMode, string sERPMode, Int64 sHType, ref string sErrMsg) |
| | | { |
| | | //sCloudMode:系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式); |
| | | //sERPMode:系统参数 库存控制-WMS库存控制ERP模式 (WISE、CLOUD、MES); |
| | | //sHType:值 1 对应缓存列表删除;值 2 对应已上传撤销; |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | //公有云模式 |
| | | if (sCloudMode == "N") |
| | | { |
| | | string sFormId = ""; //业务对象表单Id |
| | | |
| | | //生产汇报单 |
| | | if (HBillType == "3711") |
| | | { |
| | | sFormId = "PRD_MORPT"; |
| | | } |
| | | //采购入库单、委外入库单 |
| | | else if (HBillType == "1201" || HBillType == "1210") |
| | | { |
| | | sFormId = "STK_InStock"; |
| | | } |
| | | //生产入库单 |
| | | else if (HBillType == "1202") |
| | | { |
| | | sFormId = "PRD_INSTOCK"; |
| | | } |
| | | //其他入库单 |
| | | else if (HBillType == "1203") |
| | | { |
| | | sFormId = "STK_MISCELLANEOUS"; |
| | | } |
| | | //领料出库单 |
| | | else if (HBillType == "1204") |
| | | { |
| | | sFormId = "PRD_PickMtrl"; |
| | | } |
| | | //销售出库单 |
| | | else if (HBillType == "1205") |
| | | { |
| | | sFormId = "SAL_OUTSTOCK"; |
| | | } |
| | | //其他出库单 |
| | | else if (HBillType == "1206") |
| | | { |
| | | sFormId = "STK_MisDelivery"; |
| | | } |
| | | //委外出库单 |
| | | else if (HBillType == "1211") |
| | | { |
| | | sFormId = "SUB_PickMtrl"; |
| | | } |
| | | //生产补料单 |
| | | else if (HBillType == "1254") |
| | | { |
| | | sFormId = "PRD_FeedMtrl"; |
| | | } |
| | | //委外补料单 |
| | | else if (HBillType == "1255") |
| | | { |
| | | sFormId = "SUB_FEEDMTRL"; |
| | | } |
| | | //直接调拨单 |
| | | else if (HBillType == "1207") |
| | | { |
| | | sFormId = "STK_TransferDirect"; |
| | | } |
| | | //分步式调出单 |
| | | else if (HBillType == "1250") |
| | | { |
| | | sFormId = "STK_TRANSFEROUT"; |
| | | } |
| | | //分步式调入单 |
| | | else if (HBillType == "1251") |
| | | { |
| | | sFormId = "STK_TRANSFERIN"; |
| | | } |
| | | //采购退料单(采购入库单红字) |
| | | else if (HBillType == "1239") |
| | | { |
| | | sFormId = "PUR_MRB"; |
| | | } |
| | | //生产退库单(产品入库单红字) |
| | | else if (HBillType == "1245") |
| | | { |
| | | sFormId = "PRD_RetStock"; |
| | | } |
| | | //其他入库单(红字) |
| | | else if (HBillType == "1248") |
| | | { |
| | | sFormId = ""; |
| | | } |
| | | //委外退库单(委外入库单红字) |
| | | else if (HBillType == "1246") |
| | | { |
| | | sFormId = ""; |
| | | } |
| | | //生产退料单(生产领料单红字) |
| | | else if (HBillType == "1244") |
| | | { |
| | | sFormId = "PRD_ReturnMtrl"; |
| | | } |
| | | //销售退货单(销售出库单红字) |
| | | else if (HBillType == "1247") |
| | | { |
| | | sFormId = "SAL_RETURNSTOCK"; |
| | | } |
| | | //其他出库单(红字) |
| | | else if (HBillType == "1249") |
| | | { |
| | | sFormId = ""; |
| | | } |
| | | //委外退料单(委外出库单红字) |
| | | else if (HBillType == "1238") |
| | | { |
| | | sFormId = "SUB_RETURNMTRL"; |
| | | } |
| | | |
| | | //从配置文件获取 CLOUD网址、账套信息、登录用户、登录密码 |
| | | if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo)) |
| | | { |
| | | sErrMsg = Pub_Class.ClsPub.sExeReturnInfo; |
| | | return false; |
| | | } |
| | | |
| | | //获取CLOUD账号密码 |
| | | string sCLOUDUseName = Pub_Class.ClsPub.sCLOUDUseName; |
| | | string sCLOUDPsd = Pub_Class.ClsPub.sCLOUDPsd; |
| | | string dbId = Pub_Class.ClsPub.sCLOUDAcc; |
| | | ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl); |
| | | bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052); |
| | | |
| | | if (bLogin) |
| | | { |
| | | //单据查询 |
| | | string sJson = "{\"FormId\":\"" + sFormId + "\"," + |
| | | "\"FieldKeys\":\"FBillNo\"," + |
| | | "\"FilterString\":\"FBillNo='" + HBillNo + "'\"," + // 过滤条件 |
| | | "\"OrderString\":\"\"," + // 排序条件 |
| | | "\"TopRowCount\":\"0\"," + // 最多允许查询的数量,0或者不要此属性表示不限制 |
| | | "\"StartRow\":\"0\"," + // 分页取数开始行索引,从0开始,例如每页10行数据,第2页开始是10,第3页开始是20 |
| | | "\"Limit\":\"0\"" + // 分页取数每页允许获取的数据,最大不能超过2000 |
| | | " }"; |
| | | var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery", |
| | | new object[] { sJson }); |
| | | var _saveObj = JArray.Parse(result); |
| | | |
| | | //判断返回的数组中有无数据,无数据代表没查询到对应单据 |
| | | if (_saveObj.Count == 0) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //sHType = 1对应缓存列表删除 |
| | | if (sHType == 1) |
| | | { |
| | | //判断返回的数组数据中是否存在"false",存在代表递入的业务对象表单Id不正确 |
| | | if (_saveObj[0][0].ToString().Contains("false") == true) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "数据存在异常,不允许删除!单据号:" + HBillNo + " 在金蝶云中已生成单据,请先在金蝶云里删除该单据,并在缓存列表的已上传界面撤销该单据,再对该单据进行编辑或删除操作!"; |
| | | return false; |
| | | } |
| | | } |
| | | //sHType = 2对应已上传撤销 |
| | | else |
| | | { |
| | | //判断返回的数组数据中是否存在"false",存在代表递入的业务对象表单Id不正确 |
| | | if (_saveObj[0][0].ToString().Contains("false") == true) |
| | | { |
| | | sErrMsg = "此模块暂不支持撤销功能!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "撤销单据失败,单据号:" + HBillNo + ",金蝶云里未删除,不允许撤销!"; |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "默认金蝶云账号登录失败!"; |
| | | return false; |
| | | } |
| | | } |
| | | //私有云模式 |
| | | else |
| | | { |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_WMS_BillQuery " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + sERPMode + "'," + sHType.ToString(), "h_p_WMS_BillQuery"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据查询发生错误!"; |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | //缓存列表界面,选择编辑时,判断所选单据是否存在已上传记录 |
| | | [WebMethod] |
| | |
| | | else if (oSystemParameter.omodel.WMS_CampanyName == "小卫") |
| | | { |
| | | //解析条码 |
| | | if (!GetJXBarCode_XiaoWei(sBarCode, HQty, HStockOrgID, ref sErrMsg)) |
| | | if (!GetJXBarCode_XiaoWei(sBarCode, HStockOrgID, ref sErrMsg)) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | if (dal.GetInfoByBarCode_View(sBarCode)) |
| | | if (dal.GetInfoByBarCode(sBarCode, HBillType, HStockOrgID)) |
| | | { |
| | | if (dal.omodel_View.HStopflag) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | //将物料条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | //分解托盘条码得到明细条码信息写入条码出入库临时表 |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "分解托盘条码发生错误!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]); |
| | | dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeType"]); |
| | | dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HMaterID"]); |
| | | dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HAuxPropID"]); |
| | | dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBatchNo"]); |
| | | dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[i]["HQty"]); |
| | | dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceInterID"]); |
| | | dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HSourceBillNo"]); |
| | | dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HMTONo"]); |
| | | |
| | | //将物料条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描失败!" + dal.omodel_View.HBarCode + sErrMsg; |
| | | return null; |
| | | } |
| | | SourceFlag = true; |
| | | } |
| | | } |
| | | return oBar; |
| | | } |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | //条码类型不为托盘条码 |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | sErrMsg = "条码档案中不存在该条码,条码解析失败!"; |
| | | return null; |
| | | } |
| | | } |
| | |
| | | return null; |
| | | } |
| | | } |
| | | else if (oSystemParameter.omodel.WMS_CampanyName == "小卫") |
| | | { |
| | | //解析条码 |
| | | if (!GetJXBarCode_XiaoWei(sBarCode, HStockOrgID, ref sErrMsg)) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | if (dal.GetInfoByBarCode(sBarCode, HBillType, HStockOrgID)) |
| | | { |
| | | if (dal.omodel_View.HStopflag) |
| | | { |
| | | sErrMsg = "条码已被禁用,不允许扫描!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,条码解析失败!"; |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | |
| | | { |
| | | sRelQty = omodel_View.HQty; |
| | | } |
| | | |
| | | } |
| | | else |
| | | //批次条码、品种条码 |
| | | { |
| | | if (HQty > 0) |
| | | if (oSystemParameterMain.WMS_CampanyName == "小卫") |
| | | { |
| | | sRelQty = HQty; |
| | | } |
| | | else if (omodel_View.HSourceQty > 0) |
| | | { |
| | | sRelQty = omodel_View.HSourceQty; |
| | | if (HQty > 0 && omodel_View.HQty > HQty) |
| | | { |
| | | sRelQty = HQty; |
| | | } |
| | | else |
| | | { |
| | | sRelQty = omodel_View.HQty; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sRelQty = omodel_View.HQty; |
| | | if (HQty > 0) |
| | | { |
| | | sRelQty = HQty; |
| | | } |
| | | else if (omodel_View.HSourceQty > 0) |
| | | { |
| | | sRelQty = omodel_View.HSourceQty; |
| | | } |
| | | else |
| | | { |
| | | sRelQty = omodel_View.HQty; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | else |
| | | //批次条码、品种条码 |
| | | { |
| | | if (HQty > 0) |
| | | if (oSystemParameterMain.WMS_CampanyName == "小卫") |
| | | { |
| | | sRelQty = HQty; |
| | | } |
| | | else if (omodel_View.HSourceQty > 0) |
| | | { |
| | | sRelQty = omodel_View.HSourceQty; |
| | | if (HQty > 0 && omodel_View.HQty > HQty) |
| | | { |
| | | sRelQty = HQty; |
| | | } |
| | | else |
| | | { |
| | | sRelQty = omodel_View.HQty; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sRelQty = omodel_View.HQty; |
| | | if (HQty > 0) |
| | | { |
| | | sRelQty = HQty; |
| | | } |
| | | else if (omodel_View.HSourceQty > 0) |
| | | { |
| | | sRelQty = omodel_View.HSourceQty; |
| | | } |
| | | else |
| | | { |
| | | sRelQty = omodel_View.HQty; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | #region 小卫条码解析 |
| | | |
| | | [WebMethod] |
| | | public bool GetJXBarCode_XiaoWei(string sBarCode, Double HQty,long HStockOrgID, ref string sErrMsg) |
| | | public bool GetJXBarCode_XiaoWei(string sBarCode,long HStockOrgID, ref string sErrMsg) |
| | | { |
| | | try |
| | | { |
| | | //条码解析 |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | //获取对应条码解析数据 |
| | | string sHMaterNumber = ""; //物料编码 |
| | | string sHMaterName = ""; //物料名称 |
| | | string sHSupNumber = ""; //供应商编码 |
| | | string sHBatchNo = ""; //来料批号 |
| | | string sHBarQty = ""; //来料数量 |
| | | string sHPOOrderBillNo = ""; //采购订单编码 |
| | | string sHSourceBillType = "1102"; //源单类型(采购订单1102) |
| | | string sHBarCodeType = "唯一条码"; //条码类型 |
| | | string[] str = sBarCode.Split('@'); |
| | | |
| | | //通过条码字段数量进入不同的解析方式,因为有同一个数组位置,填写的是不同字段的内容,比如有的第三位显示的是批号信息,有的第三位显示的是物料名称信息 |
| | | if (str.Length == 4) |
| | | //条码规则:物料编码 @供应商编码 @生产日批号8位日期码 @采购订单编码 @来料总数量 |
| | | if (str.Length == 5) |
| | | { |
| | | DataSet ds; |
| | | string HMaterNumber = str[0]; |
| | | string HSupNumber = str[1]; |
| | | string HBatchNo = str[2]; |
| | | string HBarQty = str[3]; |
| | | |
| | | string HSupIDs = "0"; |
| | | //查询供应商 |
| | | ds = oCn.RunProcReturn("select * from Gy_Supplier with(nolock) where HNumber ='" + HSupNumber + "' and HUSEORGID=" + HStockOrgID, "Gy_Supplier"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "条码解析失败,请确认条码供应商是否正确!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | HSupIDs = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | |
| | | string HMaterNames = ""; |
| | | string HMaterModels = ""; |
| | | string HMaterIDs = "0"; |
| | | string HISKFPERIOD = "0";// 保质期启用标记 |
| | | string HUnitIDs = "0"; |
| | | //查询物料 |
| | | ds = oCn.RunProcReturn("select HUnitID,HItemID,HName,HModel,case HISKFPERIOD when 1 then '1' else '0' end HISKFPERIOD from Gy_Material a with(nolock) where HNumber='" + HMaterNumber + "' and HUSEORGID=" + HStockOrgID + " order by a.HISKFPERIOD desc", "Gy_Material"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "条码解析失败,请确认条码物料是否正确!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | HMaterIDs = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | HMaterNames = ds.Tables[0].Rows[0]["HName"].ToString(); |
| | | HMaterModels = ds.Tables[0].Rows[0]["HModel"].ToString(); |
| | | HISKFPERIOD = ds.Tables[0].Rows[0]["HISKFPERIOD"].ToString(); |
| | | HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); |
| | | } |
| | | DateTime HDate = DateTime.Now;//日期 |
| | | string HProduceDate = "";//生产日期 |
| | | string HExpiryDate = "";//保质期至 |
| | | |
| | | string HSourceInterIDs = "0"; |
| | | string HSourceEntryIDs = "0"; |
| | | string HSourceBillNos = ""; |
| | | string HInnerBillNos = ""; |
| | | |
| | | //日期获取方式 |
| | | string HBarCodeType = "批次条码"; |
| | | Int64 HMaterID = int.Parse(HMaterIDs); |
| | | Int64 HUnitID = int.Parse(HUnitIDs); |
| | | |
| | | Int64 HSupID = int.Parse(HSupIDs); |
| | | Int64 HGroupID = 0; |
| | | int HPrintQty = 1; |
| | | |
| | | Int64 HSourceInterID = int.Parse(HSourceInterIDs); |
| | | Int64 HSourceEntryID = int.Parse(HSourceEntryIDs); |
| | | string HSourceBillNo = HSourceBillNos; |
| | | string HSourceBillType = ""; |
| | | string HWei = "0"; //尾数 |
| | | |
| | | Int64 HBarcodeQtys = 0; //总托数 |
| | | Int64 HBarcodeNo = 0; //托号 |
| | | Int64 HDeptID = 0; |
| | | string HRemark = "条码解析"; |
| | | |
| | | Int64 HCusID = 0; |
| | | string HCusType = ""; |
| | | DateTime HEndDate = DateTime.Now; |
| | | string HWorkLineName = ""; |
| | | |
| | | long HOrgID = HStockOrgID; |
| | | string HSeOrderBillNo = ""; |
| | | Int64 HInterIDs = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | Int64 HEntryID = 1; |
| | | |
| | | bool HGiveAwayFlag = false; |
| | | |
| | | string HMaterName = HMaterNames; |
| | | string HMaterModel = HMaterModels; |
| | | string HPinfan = ""; |
| | | string HMTONo = ""; |
| | | Int64 HAuxPropID = 0; |
| | | string HInnerBillNo = HInnerBillNos; |
| | | |
| | | |
| | | //Int64 HWhID = 0; |
| | | //Int64 HSPID = 0; |
| | | |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + |
| | | ",HGiveAwayFlag " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" + |
| | | ",HProduceDate,HExpiryDate,HISKFPERIOD " + |
| | | ") values (" |
| | | + "'" + sBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HBarQty.ToString() |
| | | + ",'" + HBatchNo + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'admin',getdate()," + HPrintQty.ToString() + "," + HBarQty.ToString() |
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'" |
| | | + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + ",0,0,'" + HRemark + "'" |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "',getdate()" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterIDs.ToString() + "," + HEntryID.ToString() + "" |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HProduceDate + "','" + HExpiryDate + "'," + HISKFPERIOD + ")"); |
| | | |
| | | return true; |
| | | sHMaterNumber = str[0]; |
| | | sHSupNumber = str[1]; |
| | | sHBatchNo = str[2]; |
| | | sHPOOrderBillNo = str[3]; |
| | | sHBarQty = str[4]; |
| | | } |
| | | else if (str.Length == 5) |
| | | { |
| | | //另外一种解析方法 |
| | | |
| | | return true; |
| | | //条码规则:物料编码 @供应商编码 @来料批号 @来料数量 @采购订单编码 @流水号 |
| | | else if (str.Length == 6) |
| | | { |
| | | sHMaterNumber = str[0]; |
| | | sHSupNumber = str[1]; |
| | | sHBatchNo = str[2]; |
| | | sHBarQty = str[3]; |
| | | sHPOOrderBillNo = str[4]; |
| | | } |
| | | //条码规则:物料编码 @供应商编码 @物料名称 @批号 @来料数量 @采购订单编码 @流水号 |
| | | else if (str.Length == 7) |
| | | { |
| | | sHMaterNumber = str[0]; |
| | | sHSupNumber = str[1]; |
| | | sHMaterName = str[2]; |
| | | sHBatchNo = str[3]; |
| | | sHBarQty = str[4]; |
| | | sHPOOrderBillNo = str[5]; |
| | | } |
| | | //条码规则:物料编码 @供应商编码 @物料名称 @生产批号 @每箱数量 @生产订单编码 @HH @SC |
| | | else if (str.Length == 8) |
| | | { |
| | | sHMaterNumber = str[0]; |
| | | sHSupNumber = str[1]; |
| | | sHMaterName = str[2]; |
| | | sHBatchNo = str[3]; |
| | | sHBarQty = str[4]; |
| | | sHPOOrderBillNo = str[5]; |
| | | sHSourceBillType = "3710"; |
| | | sHBarCodeType = "批次条码"; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码解析失败,请确认条码是否正确!"; |
| | | sErrMsg = "1、条码档案中不存在该条码,请确认条码是否正确!2、条码解析失败,条码格式错误,必须包含4-7个 @ 分隔符!"; |
| | | return false; |
| | | } |
| | | |
| | | |
| | | //定义并赋值条码表所需写入字段数据 |
| | | Int64 HInterID = 0; //主ID |
| | | Int64 HEntryID = 0; //子ID |
| | | string HBarCodeType = sHBarCodeType; //条码类型 |
| | | Int64 HMaterID = 0; //物料ID |
| | | Int64 HUnitID = 0; //计量单位ID |
| | | Int64 HAuxPropID = 0; //辅助属性ID |
| | | string HBatchNo = sHBatchNo; //批次号 |
| | | string HMTONo = ""; //MTO号 |
| | | double HQty = DBUtility.ClsPub.isDoule(sHBarQty); //数量 |
| | | double HinitQty = 0; //初始化数量(生成条码时数量) |
| | | double HSourceBillQty = 0; //源单可生成条码数量 |
| | | bool HGiveAwayFlag = false; //是否赠品 |
| | | string HProduceDate = ""; //生产日期(保质期用) |
| | | string HExpiryDate = ""; //保质期至(保质期用) |
| | | bool HISKFPERIOD = false; //是否启用保质期 |
| | | string HEXPUNIT = ""; //保质期单位 |
| | | double HEXPPERIOD = 0; //保质期 |
| | | Int64 HWhID = 0; //仓库ID |
| | | Int64 HSPID = 0; //仓位ID |
| | | Int64 HBarcodeQtys = 0; //总托数 |
| | | Int64 HBarcodeNo = 0; //当前托号 |
| | | string HEndQty = ""; //尾数 |
| | | Int64 HSourceInterID = 0; //源单ID |
| | | Int64 HSourceEntryID = 0; //源单子ID |
| | | string HSourceBillNo = sHPOOrderBillNo; //源单单号 |
| | | string HSourceBillType = sHSourceBillType; //源单类型 |
| | | Int64 HInitSourceEntryID = 0; //初始化源单子ID(生成条码时源单子ID) |
| | | string HRemark = "解析生成"; //备注 |
| | | Int64 HPrintQty = 0; //打印次数 |
| | | Int64 HDeptID = 0; //部门ID |
| | | Int64 HSupID = 0; //往来单位ID |
| | | Int64 HGroupID = 0; //生产班组ID |
| | | Int64 HCusID = 0; //客户ID |
| | | string HCusType = ""; //客户型号 |
| | | string HSeOrderBillNo = ""; //销售订单号 |
| | | Int64 HSeOrderSEQ = 0; //销售订单行号 |
| | | string HInnerBillNo = ""; //内部采购订单号 |
| | | string HWorkLineName = ""; //生产线 |
| | | string HMaterName = ""; //产品名称 |
| | | string HMaterModel = ""; //产品规格型号 |
| | | string HPinfan = ""; //品番 |
| | | DateTime HEndDate = DateTime.Now; ; //计划完工日期 |
| | | |
| | | //数量判断 |
| | | if (HQty <= 0) |
| | | { |
| | | sErrMsg = "条码解析失败,条码数量不允许小于0!"; |
| | | return false; |
| | | } |
| | | |
| | | //获取物料相关数据 |
| | | DataSet Mds = oCn.RunProcReturn("select top 1 HItemID,HNumber,HName,HModel,HUnitID,HISKFPERIOD,HEXPUNIT,HEXPPERIOD from Gy_Material with(nolock) where HNumber='" + sHMaterNumber + "' and HUSEORGID=" + HStockOrgID.ToString() + " order by HISKFPERIOD desc", "Gy_Material"); |
| | | if (Mds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "条码解析失败,请确认条码中物料编码:" + sHMaterNumber + " 是否正确!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | HMaterID = DBUtility.ClsPub.isLong(Mds.Tables[0].Rows[0]["HItemID"]); |
| | | if(sHMaterName!="") |
| | | { |
| | | HMaterName = sHMaterName; |
| | | } |
| | | else |
| | | { |
| | | HMaterName = DBUtility.ClsPub.isStrNull(Mds.Tables[0].Rows[0]["HName"]); |
| | | } |
| | | HUnitID = DBUtility.ClsPub.isLong(Mds.Tables[0].Rows[0]["HUnitID"]); |
| | | HISKFPERIOD = DBUtility.ClsPub.isBool(Mds.Tables[0].Rows[0]["HISKFPERIOD"]); |
| | | HEXPUNIT = DBUtility.ClsPub.isStrNull(Mds.Tables[0].Rows[0]["HEXPUNIT"]); |
| | | HEXPPERIOD = DBUtility.ClsPub.isDoule(Mds.Tables[0].Rows[0]["HEXPPERIOD"]); |
| | | } |
| | | |
| | | //获取供应商相关数据 |
| | | DataSet Sds = oCn.RunProcReturn("select top 1 HItemID from Gy_Supplier with(nolock) where HNumber='" + sHSupNumber + "' and HUSEORGID=" + HStockOrgID.ToString(), "Gy_Supplier"); |
| | | if (Sds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "条码解析失败,请确认条码中供应商编码:" + sHSupNumber + " 是否正确!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | HSupID = DBUtility.ClsPub.isLong(Sds.Tables[0].Rows[0]["HItemID"]); |
| | | } |
| | | //写入条码档案表 |
| | | oCn.RunProc("insert into Gy_BarCodeBill" + |
| | | "(HInterID,HEntryID,HBarCode,HBarCodeType,HMaterID,HUnitID" + |
| | | ",HAuxPropID,HBatchNo,HMTONo,HQty,HinitQty,HSourceBillQty" + |
| | | ",HProduceDate,HExpiryDate" + |
| | | ",HISKFPERIOD,HEXPUNIT,HEXPPERIOD,HBarCodeDate,HGiveAwayFlag" + |
| | | ",HWhID,HSPID,HBarcodeQtys,HBarcodeNo,HEndQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HInitSourceEntryID,HRemark" + |
| | | ",HPrintQty,HSTOCKORGID,HOWNERID,HDeptID,HSupID,HGroupID" + |
| | | ",HCusID,HCusType,HSeOrderBillNo,HSeOrderSEQ,HInnerBillNo,HWorkLineName" + |
| | | ",HMaterName,HMaterModel,HPinfan,HEndDate,HMaker,HMakeDate" + |
| | | ") values (" |
| | | + " " + HInterID.ToString() + "," + HEntryID.ToString() + ",'" + sBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() |
| | | + ", " + HAuxPropID.ToString() + ",'" + HBatchNo + "','" + HMTONo + "'," + HQty.ToString() + "," + HinitQty.ToString() + "," + HSourceBillQty.ToString() |
| | | + ", " + (HProduceDate == "" ? "NULL" : "'" + HProduceDate + "'") + "," + (HExpiryDate == "" ? "NULL" : "'" + HExpiryDate + "'") |
| | | + ", " + DBUtility.ClsPub.BoolToString(HISKFPERIOD) + ",'" + HEXPUNIT + "'," + HEXPPERIOD.ToString() + ",getdate()," + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) |
| | | + ", " + HWhID.ToString() + "," + HSPID.ToString() + "," + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + ",'" + HEndQty + "'" |
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "'," + HInitSourceEntryID.ToString() + ",'" + HRemark + "'" |
| | | + ", " + HPrintQty.ToString() + "," + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + "," + HDeptID.ToString() + "," + HSupID.ToString() + "," + HGroupID.ToString() |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HSeOrderBillNo + "'," + HSeOrderSEQ.ToString() + ",'" + HInnerBillNo + "','" + HWorkLineName + "'" |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "','" + HEndDate.ToShortDateString() + "','Admin',getdate()" + |
| | | ")"); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 扫描单据条码 *校验模式 |
| | | #region 扫描单据条码 *校验模式 20251225 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_BillBarCode_BillCheck(string HBillNo, string HBillType, string HMaker, Int64 HOWNERID, ref string sErrMsg) |
| | |
| | | string sAutoBarCode = "N"; //免扫物料条码模式('Y'为不扫物料条码) |
| | | string sSourceBarCodeCtl = "N"; //校验-是否进行源单对应条码核对('Y'为核对) |
| | | string sWHSPCtl = "Y"; //校验-是否校对仓库仓位('Y'为校对) |
| | | string sWHCtl = "Y"; //校验-是否校对仓库('Y'为校对) |
| | | string sERPMode = "CLOUD"; //WMS系统同步至ERP的类型(WISE、CLOUD、WMS) |
| | | string sFIFOMode = oSystemParameter.omodel.WMS_FIFOMode; //先进先出库存取值模式(WMS、CLOUD) |
| | | string sStockPlaceAutoCtl = "Y"; //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | string sFIFOCtl = "4"; //先进先出控制(1、不控制仅显示下架清单 2、严格控制先进先出 3、仅提示和显示下架清单 4、不显示下架清单也不控制) |
| | | |
| | | #region 系统参数获取 |
| | | //采购入库单 |
| | |
| | | if (oSystemParameter.omodel.Kf_POStockInBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_POStockInBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_POStockInBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //生产入库单 |
| | | else if (HBillType == "1202") |
| | |
| | | if (oSystemParameter.omodel.Kf_ProductInBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_ProductInBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_ProductInBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //其他入库单 |
| | | else if (HBillType == "1203") |
| | |
| | | if (oSystemParameter.omodel.Kf_OtherInBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_OtherInBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_OtherInBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //领料出库单 |
| | | else if (HBillType == "1204") |
| | |
| | | if (oSystemParameter.omodel.Kf_MateOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_MateOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_MateOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl; |
| | | } |
| | | //销售出库单 |
| | | else if (HBillType == "1205") |
| | |
| | | if (oSystemParameter.omodel.Kf_SellOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_SellOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_SellOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl; |
| | | } |
| | | //其他出库单 |
| | | else if (HBillType == "1206") |
| | |
| | | if (oSystemParameter.omodel.Kf_OtherOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_OtherOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_OtherOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl; |
| | | } |
| | | //委外领料单 |
| | | else if (HBillType == "1211") |
| | |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl; |
| | | } |
| | | //生产补料单 |
| | | else if (HBillType == "1254") |
| | |
| | | if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl; |
| | | } |
| | | //委外补料单 |
| | | else if (HBillType == "1255") |
| | |
| | | if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl; |
| | | } |
| | | //直接调拨单 |
| | | else if (HBillType == "1207") |
| | |
| | | if (oSystemParameter.omodel.Kf_MoveStockBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_MoveStockBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_MoveStockBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl; |
| | | } |
| | | //采购退料单 |
| | | else if (HBillType == "1239") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //免扫物料条码模式('Y'为不扫物料条码) |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | //WMS系统同步至ERP的类型(WISE、CLOUD、WMS) |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_ERPMode == "WMS") |
| | | { |
| | | sERPMode = "WMS"; |
| | | } |
| | | else if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_ERPMode == "WISE") |
| | | { |
| | | sERPMode = "WISE"; |
| | | } |
| | | else |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //生产退库单 |
| | | else if (HBillType == "1245") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //免扫物料条码模式('Y'为不扫物料条码) |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | //WMS系统同步至ERP的类型(WISE、CLOUD、WMS) |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_ERPMode == "WMS") |
| | | { |
| | | sERPMode = "WMS"; |
| | | } |
| | | else if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_ERPMode == "WISE") |
| | | { |
| | | sERPMode = "WISE"; |
| | | } |
| | | else |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //生产退料单 |
| | | else if (HBillType == "1244") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //免扫物料条码模式('Y'为不扫物料条码) |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | //WMS系统同步至ERP的类型(WISE、CLOUD、WMS) |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_ERPMode == "WMS") |
| | | { |
| | | sERPMode = "WMS"; |
| | | } |
| | | else if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_ERPMode == "WISE") |
| | | { |
| | | sERPMode = "WISE"; |
| | | } |
| | | else |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //销售退货单 |
| | | else if (HBillType == "1247") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //免扫物料条码模式('Y'为不扫物料条码) |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | //WMS系统同步至ERP的类型(WISE、CLOUD、WMS) |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_ERPMode == "WMS") |
| | | { |
| | | sERPMode = "WMS"; |
| | | } |
| | | else if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_ERPMode == "WISE") |
| | | { |
| | | sERPMode = "WISE"; |
| | | } |
| | | else |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //委外退料单 |
| | | else if (HBillType == "1238") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //免扫物料条码模式('Y'为不扫物料条码) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | //WMS系统同步至ERP的类型(WISE、CLOUD、WMS) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_ERPMode == "WMS") |
| | | { |
| | | sERPMode = "WMS"; |
| | | } |
| | | else if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_ERPMode == "WISE") |
| | | { |
| | | sERPMode = "WISE"; |
| | | } |
| | | else |
| | | { |
| | | sERPMode = "CLOUD"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameter.omodel.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | |
| | | //判断是否校对仓库仓位、是否校对仓库状态 |
| | | //(启用条码库存 或 启用先进先出)且 仓位数据从ERP中同步至本地 |
| | | if ((oSystemParameter.omodel.WMS_WMSStockCtl.ToUpper() == "Y" || (sFIFOCtl == "1" || sFIFOCtl == "2" || sFIFOCtl == "3")) && sStockPlaceAutoCtl == "Y") |
| | | { |
| | | sWHSPCtl = "Y"; |
| | | } |
| | | //(启用条码库存 或 启用先进先出)且 仓位数据本地维护 |
| | | else if ((oSystemParameter.omodel.WMS_WMSStockCtl.ToUpper() == "Y" || (sFIFOCtl == "1" || sFIFOCtl == "2" || sFIFOCtl == "3")) && sStockPlaceAutoCtl == "N") |
| | | { |
| | | sWHCtl = "Y"; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | //重新同步源单信息 |
| | | if (oSystemParameter.omodel.WMS_CloudMode.ToUpper() == "N") //系统参数 是否为私有云模式(N为公有云模式,Y为私有云模式) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | //私有云模式 |
| | | oCn.RunProc("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','" + HBillType + "'"); |
| | | } |
| | | |
| | | //免扫物料条码模式 或 原单据为扫码生成,对原扫描的条码进行核对 |
| | | if (sAutoBarCode == "Y" || sSourceBarCodeCtl == "Y") |
| | |
| | | else |
| | | { |
| | | //将单据信息写入条码出入库临时表KF_PonderationBillMain_Temp |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBillBarCode_BillCheck_New '" + HBillNo + "','" + HBillType + "','" + HMaker + "'," + HOWNERID.ToString() + ",'" + sWHSPCtl + "','" + sERPMode + "'", "h_p_WMS_AddBillBarCode_BillCheck_New"); |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBillBarCode_BillCheck_New '" + HBillNo + "','" + HBillType + "','" + HMaker + "'," + HOWNERID.ToString() + ",'" + sWHSPCtl + "','" + sWHCtl + "','" + sStockPlaceAutoCtl + "','" + sERPMode + "'", "h_p_WMS_AddBillBarCode_BillCheck_New"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ";将单据信息写入条码出入库临时表失败!"; |
| | |
| | | oBar.HRemark = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]); |
| | | oBar.HBack = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBack"]); |
| | | oBar.HSourceBarCodeFlag = DBUtility.ClsPub.isBool(ds1.Tables[0].Rows[0]["HSourceBarCodeFlag"]); |
| | | |
| | | //先进先出控制 |
| | | if (sFIFOCtl == "1" || sFIFOCtl == "2" || sFIFOCtl == "3") //系统参数 先进先出控制 |
| | | { |
| | | DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_BillCheck '" + HBillType + "','" + HBillNo + "','" + sFIFOMode + "','" + sStockPlaceAutoCtl + "'," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFO_BillCheck"); |
| | | if (FIFO == null || FIFO.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + oBar.HInterID + ";存入先进先出临时表失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + oBar.HInterID + ";" + DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 扫描物料条码 *校验模式 |
| | | #region 扫描物料条码 *校验模式 20251225 |
| | | |
| | | //原单据非扫码生成,扫描物料条码 存入条码出入库临时表 |
| | | [WebMethod] |
| | | public bool set_SavePonderationBillMain_Temp_BarCode_BillCheck(Model.ClsGy_BarCodeBill_WMS_Model_View omodel_View, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HOWNERID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | public bool set_SavePonderationBillMain_Temp_BarCode_BillCheck(Model.ClsGy_BarCodeBill_WMS_Model_View omodel_View, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HOWNERID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, Int64 Type, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DAL.ClsKF_PonderationBillMain_Temp_Ctl tem = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); |
| | |
| | | |
| | | double sRelQty = 0; |
| | | string sWHSPCtl = "Y"; //校验-是否校对仓库仓位('Y'为校对) |
| | | string sWHCtl = "Y"; //校验-是否校对仓库('Y'为校对) |
| | | string sMultilineCtl = "N"; //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | string sMustQtyCtl = "完全等于应收"; //校验数量控制(小于等于应收、完全等于应收、不控制) |
| | | string sOneScanCtl = "N"; //一次扫码控制('Y'为控制) |
| | | string sERPStockCtl = "N"; //库存控制-ERP负库存控制 |
| | | string sStockPlaceAutoCtl = "Y"; //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | string sFIFOCtl = "4"; //先进先出控制(1、不控制仅显示下架清单 2、严格控制先进先出 3、仅提示和显示下架清单 4、不显示下架清单也不控制) |
| | | string sWMSStockCtl = oSystemParameterMain.WMS_WMSStockCtl.ToUpper(); //库存控制-条码库存控制 |
| | | |
| | | #region 系统参数获取 |
| | | //采购入库单 |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_POStockInBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_POStockInBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_POStockInBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //生产入库单 |
| | | else if (HBillType == "1202") |
| | |
| | | if (oSystemParameterMain.Kf_ProductInBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_ProductInBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_ProductInBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_ProductInBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //其他入库单 |
| | | else if (HBillType == "1203") |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_OtherInBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_OtherInBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_OtherInBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //领料出库单 |
| | | else if (HBillType == "1204") |
| | |
| | | if (oSystemParameterMain.Kf_MateOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_MateOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_MateOutBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //库存控制-ERP负库存控制 |
| | | if (oSystemParameterMain.Kf_MateOutBillCheck_ERPMode == "CLOUD" && oSystemParameterMain.WMS_CloudMode.ToUpper() == "Y") |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_MateOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sERPStockCtl = "Y"; |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | else |
| | | { |
| | | sERPStockCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameterMain.Kf_MateOutBillCheck_FIFOCtl; |
| | | } |
| | | //销售出库单 |
| | | else if (HBillType == "1205") |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_SellOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_SellOutBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //库存控制-ERP负库存控制 |
| | | if (oSystemParameterMain.Kf_SellOutBillCheck_ERPMode == "CLOUD" && oSystemParameterMain.WMS_CloudMode.ToUpper() == "Y") |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_SellOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sERPStockCtl = "Y"; |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | else |
| | | { |
| | | sERPStockCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameterMain.Kf_SellOutBillCheck_FIFOCtl; |
| | | } |
| | | //其他出库单 |
| | | else if (HBillType == "1206") |
| | |
| | | if (oSystemParameterMain.Kf_OtherOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_OtherOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_OtherOutBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //库存控制-ERP负库存控制 |
| | | if (oSystemParameterMain.Kf_OtherOutBillCheck_ERPMode == "CLOUD" && oSystemParameterMain.WMS_CloudMode.ToUpper() == "Y") |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_OtherOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sERPStockCtl = "Y"; |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | else |
| | | { |
| | | sERPStockCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameterMain.Kf_OtherOutBillCheck_FIFOCtl; |
| | | } |
| | | //委外领料单 |
| | | else if (HBillType == "1211") |
| | |
| | | if (oSystemParameterMain.Kf_EntrustOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_EntrustOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_EntrustOutBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //库存控制-ERP负库存控制 |
| | | if (oSystemParameterMain.Kf_EntrustOutBillCheck_ERPMode == "CLOUD" && oSystemParameterMain.WMS_CloudMode.ToUpper() == "Y") |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_EntrustOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sERPStockCtl = "Y"; |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | else |
| | | { |
| | | sERPStockCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameterMain.Kf_EntrustOutBillCheck_FIFOCtl; |
| | | } |
| | | //生产补料单 |
| | | else if (HBillType == "1254") |
| | |
| | | if (oSystemParameterMain.Kf_MateReplenishOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_MateReplenishOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_MateReplenishOutBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //库存控制-ERP负库存控制 |
| | | if (oSystemParameterMain.Kf_MateReplenishOutBillCheck_ERPMode == "CLOUD" && oSystemParameterMain.WMS_CloudMode.ToUpper() == "Y") |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_MateReplenishOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sERPStockCtl = "Y"; |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | else |
| | | { |
| | | sERPStockCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameterMain.Kf_MateReplenishOutBillCheck_FIFOCtl; |
| | | } |
| | | //委外补料单 |
| | | else if (HBillType == "1255") |
| | |
| | | if (oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //库存控制-ERP负库存控制 |
| | | if (oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_ERPMode == "CLOUD" && oSystemParameterMain.WMS_CloudMode.ToUpper() == "Y") |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sERPStockCtl = "Y"; |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | else |
| | | { |
| | | sERPStockCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameterMain.Kf_EntrustReplenishOutBillCheck_FIFOCtl; |
| | | } |
| | | //直接调拨单 |
| | | else if (HBillType == "1207") |
| | |
| | | if (oSystemParameterMain.Kf_MoveStockBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_MoveStockBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_MoveStockBillCheck_MultilineCtl.ToUpper() == "Y") |
| | |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //库存控制-ERP负库存控制 |
| | | if (oSystemParameterMain.Kf_MoveStockBillCheck_ERPMode == "CLOUD" && oSystemParameterMain.WMS_CloudMode.ToUpper() == "Y") |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_MoveStockBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sERPStockCtl = "Y"; |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | //先进先出控制 |
| | | sFIFOCtl = oSystemParameterMain.Kf_MoveStockBillCheck_FIFOCtl; |
| | | } |
| | | //采购退料单 |
| | | else if (HBillType == "1239") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameterMain.Kf_POStockInBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_POStockInBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_POStockInBackBillCheck_MultilineCtl.ToUpper() == "Y") |
| | | { |
| | | sMultilineCtl = "Y"; |
| | | } |
| | | //校验数量控制(小于等于应收、完全等于应收、不控制) |
| | | if (oSystemParameterMain.Kf_POStockInBackBillCheck_MustQtyCtl == "小于等于应收") |
| | | { |
| | | sMustQtyCtl = "小于等于应收"; |
| | | } |
| | | else if (oSystemParameterMain.Kf_POStockInBackBillCheck_MustQtyCtl == "不控制") |
| | | { |
| | | sMustQtyCtl = "不控制"; |
| | | } |
| | | else |
| | | { |
| | | sERPStockCtl = "N"; |
| | | sMustQtyCtl = "完全等于应收"; |
| | | } |
| | | //一次扫码控制('Y'为控制) |
| | | if (oSystemParameterMain.Kf_POStockInBackBill_BillTypeOneScan.ToUpper() == "Y") |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_POStockInBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //生产退库单 |
| | | else if (HBillType == "1245") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameterMain.Kf_ProductInBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_ProductInBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_ProductInBackBillCheck_MultilineCtl.ToUpper() == "Y") |
| | | { |
| | | sMultilineCtl = "Y"; |
| | | } |
| | | //校验数量控制(小于等于应收、完全等于应收、不控制) |
| | | if (oSystemParameterMain.Kf_ProductInBackBillCheck_MustQtyCtl == "小于等于应收") |
| | | { |
| | | sMustQtyCtl = "小于等于应收"; |
| | | } |
| | | else if (oSystemParameterMain.Kf_ProductInBackBillCheck_MustQtyCtl == "不控制") |
| | | { |
| | | sMustQtyCtl = "不控制"; |
| | | } |
| | | else |
| | | { |
| | | sMustQtyCtl = "完全等于应收"; |
| | | } |
| | | //一次扫码控制('Y'为控制) |
| | | if (oSystemParameterMain.Kf_ProductInBackBill_BillTypeOneScan.ToUpper() == "Y") |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_ProductInBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //生产退料单 |
| | | else if (HBillType == "1244") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameterMain.Kf_MateOutBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_MateOutBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_MateOutBackBillCheck_MultilineCtl.ToUpper() == "Y") |
| | | { |
| | | sMultilineCtl = "Y"; |
| | | } |
| | | //校验数量控制(小于等于应收、完全等于应收、不控制) |
| | | if (oSystemParameterMain.Kf_MateOutBackBillCheck_MustQtyCtl == "小于等于应收") |
| | | { |
| | | sMustQtyCtl = "小于等于应收"; |
| | | } |
| | | else if (oSystemParameterMain.Kf_MateOutBackBillCheck_MustQtyCtl == "不控制") |
| | | { |
| | | sMustQtyCtl = "不控制"; |
| | | } |
| | | else |
| | | { |
| | | sMustQtyCtl = "完全等于应收"; |
| | | } |
| | | //一次扫码控制('Y'为控制) |
| | | if (oSystemParameterMain.Kf_MateOutBackBill_BillTypeOneScan.ToUpper() == "Y") |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_MateOutBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //销售退货单 |
| | | else if (HBillType == "1247") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameterMain.Kf_SellOutBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_SellOutBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_SellOutBackBillCheck_MultilineCtl.ToUpper() == "Y") |
| | | { |
| | | sMultilineCtl = "Y"; |
| | | } |
| | | //校验数量控制(小于等于应收、完全等于应收、不控制) |
| | | if (oSystemParameterMain.Kf_SellOutBackBillCheck_MustQtyCtl == "小于等于应收") |
| | | { |
| | | sMustQtyCtl = "小于等于应收"; |
| | | } |
| | | else if (oSystemParameterMain.Kf_SellOutBackBillCheck_MustQtyCtl == "不控制") |
| | | { |
| | | sMustQtyCtl = "不控制"; |
| | | } |
| | | else |
| | | { |
| | | sMustQtyCtl = "完全等于应收"; |
| | | } |
| | | //一次扫码控制('Y'为控制) |
| | | if (oSystemParameterMain.Kf_SellOutBackBill_BillTypeOneScan.ToUpper() == "Y") |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_SellOutBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | //委外退料单 |
| | | else if (HBillType == "1238") |
| | | { |
| | | //校验-是否校对仓库仓位('Y'为校对) |
| | | if (oSystemParameterMain.Kf_EntrustOutBackBillCheck_WHSPCtl.ToUpper() == "N") |
| | | { |
| | | sWHSPCtl = "N"; |
| | | } |
| | | //校验-是否校对仓库('Y'为校对) |
| | | if (oSystemParameterMain.Kf_EntrustOutBackBillCheck_WHCtl.ToUpper() == "N") |
| | | { |
| | | sWHCtl = "N"; |
| | | } |
| | | //校验-多行相同物料自动拆分换行匹配('Y'为自动拆分) |
| | | if (oSystemParameterMain.Kf_EntrustOutBackBillCheck_MultilineCtl.ToUpper() == "Y") |
| | | { |
| | | sMultilineCtl = "Y"; |
| | | } |
| | | //校验数量控制(小于等于应收、完全等于应收、不控制) |
| | | if (oSystemParameterMain.Kf_EntrustOutBackBillCheck_MustQtyCtl == "小于等于应收") |
| | | { |
| | | sMustQtyCtl = "小于等于应收"; |
| | | } |
| | | else if (oSystemParameterMain.Kf_EntrustOutBackBillCheck_MustQtyCtl == "不控制") |
| | | { |
| | | sMustQtyCtl = "不控制"; |
| | | } |
| | | else |
| | | { |
| | | sMustQtyCtl = "完全等于应收"; |
| | | } |
| | | //一次扫码控制('Y'为控制) |
| | | if (oSystemParameterMain.Kf_EntrustOutBackBill_BillTypeOneScan.ToUpper() == "Y") |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //仓位是否从ERP同步('N'为仓位数据本地维护,'Y'为仓位数据从ERP中同步至本地) |
| | | if (oSystemParameterMain.Kf_EntrustOutBackBillCheck_ERPMode.ToUpper() != "WMS" && oSystemParameterMain.WMS_StockPlaceAutoCtl.ToUpper() == "N") |
| | | { |
| | | sStockPlaceAutoCtl = "N"; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | string HMaterNumber; //物料代码 |
| | | //判断是否存在相同条码,判断所扫条码是否在单据中 |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_BillCheck_New '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + ",'" + sWHSPCtl + "','" + sMultilineCtl + "'", "h_p_WMS_AddBarCode_BillCheck_New"); |
| | | //判断是否存在相同条码,判断所扫条码是否在单据中;出库、红字入库、调拨,判断条码库存 |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_BillCheck_New '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + ",'" + sWHSPCtl + "','" + sWHCtl + "','" + sWMSStockCtl + "','" + sStockPlaceAutoCtl + "','" + sMultilineCtl + "'," + HOWNERID.ToString(), "h_p_WMS_AddBarCode_BillCheck_New"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "判断所扫条码是否在单据中发生错误!"; |
| | |
| | | { |
| | | omodel_View.HMaterID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HMaterID"]); |
| | | omodel_View.HSourceQty = DBUtility.ClsPub.isDoule(ds1.Tables[0].Rows[0]["HSumQtyMust"]); //HSumQtyMust为源单相同物料剩余可扫数量 |
| | | HWhID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["sHWhID"]); |
| | | HSPID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["sHSPID"]); |
| | | HWhID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["sHWhID"]); //仓库/调出仓库 |
| | | HSCWHID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HWhID"]); //调入仓库 |
| | | HMaterNumber = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HMaterNumber"]); |
| | | |
| | | //仓位数据从ERP中同步至本地 |
| | | if (sStockPlaceAutoCtl == "Y") |
| | | { |
| | | HSPID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["sHSPID"]); //仓位/调出仓位 |
| | | HSCSPID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSPID"]); //调入仓位 |
| | | } |
| | | //仓位数据本地维护 |
| | | else |
| | | { |
| | | //判断仓库仓位/调出仓库仓位是否正确 |
| | | DataSet dsSP = oCn.RunProcReturn("exec h_p_WMS_CheckWHandSP " + HWhID.ToString() + "," + HSPID.ToString(), "h_p_WMS_CheckWHandSP"); |
| | | if (dsSP == null || dsSP.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "扫描物料条码判断仓库仓位是否正确发生错误!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(dsSP.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | if (HBillType == "1207" || HBillType == "1250" || HBillType == "1251") |
| | | { |
| | | sErrMsg = "调出" + DBUtility.ClsPub.isStrNull(dsSP.Tables[0].Rows[0]["HRemark"]); |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(dsSP.Tables[0].Rows[0]["HRemark"]); |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //调拨模块,判断调入仓库仓位是否正确 |
| | | if (HBillType == "1207" || HBillType == "1250" || HBillType == "1251") |
| | | { |
| | | DataSet dsSCSP = oCn.RunProcReturn("exec h_p_WMS_CheckWHandSP " + HSCWHID.ToString() + "," + HSCSPID.ToString(), "h_p_WMS_CheckWHandSP"); |
| | | if (dsSCSP == null || dsSCSP.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "扫描物料条码判断调入仓库仓位是否正确发生错误!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(dsSCSP.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = "调入" + DBUtility.ClsPub.isStrNull(dsSCSP.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | || HBillType == "1254" || HBillType == "1255" || HBillType == "1207" || HBillType == "1250") |
| | | { |
| | | //库存控制-WMS负库存控制 |
| | | if (omodel_View.HBarCodeType == "唯一条码" && oSystemParameterMain.WMS_WMSStockCtl.ToUpper() == "Y") |
| | | if (sWMSStockCtl == "Y") |
| | | { |
| | | //判断WMS库存 返回WMS库存数量 |
| | | DataSet DsWMS = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetWMSICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddBarCode_GetWMSICInventory"); |
| | | if (DsWMS == null || DsWMS.Tables[0].Rows.Count == 0) |
| | | sWMSQty = DBUtility.ClsPub.isDoule(ds1.Tables[0].Rows[0]["HWMSQty"]); |
| | | sWhName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HWhName"]); |
| | | sSPName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSPName"]); |
| | | |
| | | if (sWMSQty <= 0) |
| | | { |
| | | sErrMsg = "所扫描物料条码: " + omodel_View.HBarCode + " ,无条码库存!"; |
| | | sErrMsg = "所扫描物料条码:" + omodel_View.HBarCode + " ,在仓库[ " + sWhName + " ]、仓位[ " + sSPName + " ]中,无条码库存!"; |
| | | return false; |
| | | } |
| | | else |
| | | //判断扫描数量与条码库存数量 |
| | | else if (sRelQty > sWMSQty) |
| | | { |
| | | 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]["HQty"]); |
| | | sWhName = DBUtility.ClsPub.isStrNull(DsWMS.Tables[0].Rows[0]["HWhName"]); |
| | | sSPName = DBUtility.ClsPub.isStrNull(DsWMS.Tables[0].Rows[0]["HSPName"]); |
| | | |
| | | if (sWMSQty <= 0) |
| | | { |
| | | sErrMsg = "所扫描物料条码:" + omodel_View.HBarCode + " ,在仓库[ " + sWhName + " ]、仓位[ " + sSPName + " ]中,无条码库存!"; |
| | | return false; |
| | | } |
| | | //判断扫描数量与条码库存数量 |
| | | else if (sRelQty > sWMSQty) |
| | | { |
| | | sRelQty = sWMSQty; |
| | | } |
| | | sRelQty = sWMSQty; |
| | | } |
| | | } |
| | | |
| | | //库存控制-ERP负库存控制 金蝶云私有云模式 |
| | | if (sERPStockCtl == "Y") |
| | | if (oSystemParameterMain.WMS_ERPStockCtl_BillCheck.ToUpper() == "Y" && oSystemParameterMain.WMS_CloudMode.ToUpper() == "Y") |
| | | { |
| | | //判断ERP库存 返回ERP库存数量 |
| | | DataSet DsERP = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetERPICInventory_New " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddBarCode_GetERPICInventory_New"); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //先进先出控制(Type != 2 代表强控) |
| | | if (Type != 2 && (sFIFOCtl == "2" || sFIFOCtl == "3")) //系统参数 先进先出控制(2、严格控制先进先出 3、仅提示和显示下架清单) |
| | | { |
| | | DataSet dsFIFO = oCn.RunProcReturn("exec h_p_WMS_FIFOCheck " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBatchNo + "','" + omodel_View.HBarCode + "'," + sRelQty.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_WMS_FIFOCheck"); |
| | | if (dsFIFO == null || dsFIFO.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "判断先进先出控制发生错误!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(dsFIFO.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | sRelQty = DBUtility.ClsPub.isDoule(dsFIFO.Tables[0].Rows[0]["HQty"]); |
| | | } |
| | | else |
| | | { |
| | | if (sFIFOCtl == "2") |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(dsFIFO.Tables[0].Rows[0]["HRemark"]); |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "NO" + DBUtility.ClsPub.isStrNull(dsFIFO.Tables[0].Rows[0]["HRemark"]); |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //采购入库(1201)、产品入库(1202)、其他入库蓝字(1203)、委外入库(1210) |
| | | //生产退料(1244)、销售退库(1247)、其他出库红字(1249)、委外退料(1238) |
| | |
| | | { |
| | | if (DBUtility.ClsPub.isDoule(DsInQty.Tables[0].Rows[0]["HQty"]) == 0) |
| | | { |
| | | sErrMsg = "所扫描物料条码: " + omodel_View.HBarCode + " ,已被其他单据扫描入库,不允许再次扫码!"; |
| | | sErrMsg = "所扫描物料条码: " + omodel_View.HBarCode + " ,已扫码入库,不允许再次扫码!"; |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isDoule(DsInQty.Tables[0].Rows[0]["HQty"]) < sRelQty) |
| | |
| | | //唯一条码,一次扫码控制,同一条码、同一单据类型,在WMS表和TEMP表里,只允许进行一次扫码 |
| | | if (omodel_View.HBarCodeType == "唯一条码" && sOneScanCtl == "Y") |
| | | { |
| | | Int64 HSCWHID = 0; //调出仓库ID |
| | | Int64 HSCSPID = 0; //调出仓位ID |
| | | Int64 sHWhID = 0; //仓库/调入仓库ID |
| | | Int64 sHSPID = 0; //仓位/调入仓位ID |
| | | //直接调拨单(1207)、分步式调出单(1250)、分步式调入单(1251) |
| | | if (HBillType == "1207" || HBillType == "1250" || HBillType == "1251") |
| | | { |
| | | HSCWHID = HWhID; |
| | | HSCSPID = HSPID; |
| | | HWhID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HWhID"]); |
| | | HSPID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSPID"]); |
| | | sHWhID = HSCWHID; |
| | | sHSPID = HSCSPID; |
| | | } |
| | | DataSet dsOneScan = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_OneScan '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + "," + HSCWHID + "," + HSCSPID + ",'" + HMaker + "'", "h_p_WMS_AddBarCode_OneScan"); |
| | | else |
| | | { |
| | | sHWhID = HWhID; |
| | | sHSPID = HSPID; |
| | | } |
| | | DataSet dsOneScan = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_OneScan '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + sHWhID + "," + sHSPID + "," + HWhID + "," + HSPID + ",'" + HMaker + "'", "h_p_WMS_AddBarCode_OneScan"); |
| | | if (dsOneScan == null || dsOneScan.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | |
| | | oMain.HMTONo = omodel_View.HMTONo; |
| | | if (HBillType == "1207" || HBillType == "1250" || HBillType == "1251") |
| | | { |
| | | oMain.HWhID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[i]["HWhID"]); |
| | | oMain.HStockPlaceID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[i]["HSPID"]); |
| | | oMain.HWhID = HSCWHID; |
| | | oMain.HStockPlaceID = HSCSPID; |
| | | oMain.HSCWHID = HWhID; |
| | | oMain.HOutStockPlaceID = HSPID; |
| | | } |
| | |
| | | //条码类型不为托盘条码 |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg)) |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, 0, 0, HQty, HOWNERID, oSystemParameter.omodel, 1, ref sErrMsg)) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | return null; |
| | |
| | | //条码类型不为托盘条码 |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg)) |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, 0, 0, HQty, HOWNERID, oSystemParameter.omodel, 1, ref sErrMsg)) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | return null; |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 一键扫码(原单据为扫码生成,对原扫描的条码进行核对) *校验模式 |
| | | #region 一键扫码(原单据非扫码生成) *校验模式 20251225 |
| | | |
| | | //一键扫码模式,根据条码前缀走 不同方法(仓库条码、仓位条码、单据号条码、物料条码) |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_CheckTypeByBarCode_BillCheck_New(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HOWNERID, ref string sErrMsg) |
| | | { |
| | | try |
| | | { |
| | | Int64 Type = 1; //区分先进先出是否强控制,1为强控,2为不控制 |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | |
| | | if (sBarCode.Trim() == "") |
| | | { |
| | | sErrMsg = "条码不能为空,请扫描条码!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | //判断条码是否含特殊符号 # ,如果含有则 拆分 |
| | | string[] NewBarCode; |
| | | if (sBarCode.Contains("#")) |
| | | { |
| | | NewBarCode = sBarCode.Split(Convert.ToChar("#")); |
| | | sBarCode = NewBarCode[0]; |
| | | if (HQty == 0) |
| | | { |
| | | HQty = DBUtility.ClsPub.isDoule(NewBarCode[1]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | |
| | | //根据系统参数,判断是否启用一键扫码模式,Y为启用 |
| | | //未启用,只扫描物料条码 |
| | | if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N") |
| | | { |
| | | DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); |
| | | if (dal.GetInfoByBarCode(sBarCode, HBillType, HOWNERID)) |
| | | { |
| | | if (dal.omodel_View.HStopflag) |
| | | { |
| | | sErrMsg = "条码已被禁用,不允许扫描!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | //将托条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_PackBarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HOWNERID, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | //条码类型不为托盘条码 |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, HOWNERID, oSystemParameter.omodel, Type, ref sErrMsg)) |
| | | { |
| | | //判断字符串 sErrMsg 是否以 "NO" 开头(不区分大小写) |
| | | if (sErrMsg.StartsWith("NO", StringComparison.OrdinalIgnoreCase)) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | oBar.HRemark = "仅提示"; |
| | | return oBar; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | } |
| | | oBar.HBarType = "物料条码"; |
| | | return oBar; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | return null; |
| | | } |
| | | } |
| | | //启用,根据条码前缀走不同方法(仓库条码、仓位条码、单据条码、物料条码) |
| | | else |
| | | { |
| | | string sBarCodePrefix = sBarCode.Substring(0, Math.Min(3, sBarCode.Length));//截取条码前三位字符串 |
| | | |
| | | //根据递入的条码前三位,判断条码类型(仓库条码、仓位条码、单据条码、物料条码) |
| | | DataSet Dss = oCn.RunProcReturn(" select HSourceName,BarCodeType from Xt_BarCodeType where HSourceNumber= '" + sBarCodePrefix + "'", "Xt_BarCodeType"); |
| | | |
| | | //无返回数据则为物料条码 |
| | | if (Dss == null || Dss.Tables[0].Rows.Count == 0) |
| | | { |
| | | DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); |
| | | if (dal.GetInfoByBarCode(sBarCode, HBillType, HOWNERID)) |
| | | { |
| | | if (dal.omodel_View.HStopflag) |
| | | { |
| | | sErrMsg = "条码已被禁用,不允许扫描!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | //将托条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_PackBarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HOWNERID, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | //条码类型不为托盘条码 |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, HOWNERID, oSystemParameter.omodel, Type, ref sErrMsg)) |
| | | { |
| | | //判断字符串 sErrMsg 是否以 "NO" 开头(不区分大小写) |
| | | if (sErrMsg.StartsWith("NO", StringComparison.OrdinalIgnoreCase)) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | oBar.HRemark = "仅提示"; |
| | | return oBar; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | } |
| | | oBar.HBarType = "物料条码"; |
| | | return oBar; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | return null; |
| | | } |
| | | } |
| | | //仓库条码、仓位条码、单据条码 |
| | | else |
| | | { |
| | | string sBarBillName = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["HSourceName"]); |
| | | string sBarBillType = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["BarCodeType"]); |
| | | |
| | | //判断条码类型为 基础资料条码 或 源单条码 |
| | | if (sBarBillType == "基础资料条码") |
| | | { |
| | | //仓库条码 |
| | | if (sBarBillName == "仓库") |
| | | { |
| | | //将递入的条码去掉前三位后转化成整形,TryParse不能转换成整数时返回false,并返回ID=0 |
| | | int ID; |
| | | if (int.TryParse(sBarCode.Remove(0, 3), out ID)) |
| | | { |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_Gy_Warehouse_PDA " + ID.ToString() + "," + HOWNERID.ToString(), "h_p_Gy_Warehouse_PDA"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "无效仓库条码!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | oBar.HBarType = "仓库条码"; |
| | | oBar.HWhID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HItemID"]); |
| | | oBar.HWhNumber = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HNumber"]); |
| | | oBar.HWhName = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HName"]); |
| | | oBar.HSPFlag = DBUtility.ClsPub.isBool(ds.Tables[0].Rows[0]["HSPFlag"]); |
| | | oBar.HSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSPID"]); |
| | | oBar.HSPNumber = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSPNumber"]); |
| | | oBar.HSPName = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSPName"]); |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "错误的仓库条码!"; |
| | | return null; |
| | | } |
| | | } |
| | | //仓位条码 |
| | | else if (sBarBillName == "仓位") |
| | | { |
| | | DAL.ClsIF_StockPlace_View dal = new DAL.ClsIF_StockPlace_View(); |
| | | //将递入的条码去掉前三位后转化成整形 |
| | | int sHSPID; |
| | | int sHWHID; |
| | | string[] sArray = sBarCode.Remove(0, 3).Split(';'); |
| | | if (int.TryParse(sArray[1], out sHSPID) && int.TryParse(sArray[0], out sHWHID)) |
| | | { |
| | | if (dal.GetInfoByID(sHSPID, sHWHID, HOWNERID)) |
| | | { |
| | | oBar.HBarType = "仓位条码"; |
| | | oBar.HSPID = dal.omodel.HItemID; |
| | | oBar.HSPNumber = dal.omodel.HNumber; |
| | | oBar.HSPName = dal.omodel.HName; |
| | | oBar.HWhID = dal.omodel.HWHID; |
| | | oBar.HWhNumber = dal.omodel.HWhNumber; |
| | | oBar.HWhName = dal.omodel.HWhName; |
| | | return oBar; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "无效仓位条码!"; |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "错误的仓位条码!"; |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "无效基础资料条码!"; |
| | | return null; |
| | | } |
| | | } |
| | | //单据条码 |
| | | else if (sBarBillType == "源单条码") |
| | | { |
| | | oBar = get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HOWNERID, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "启用一键扫码模式," + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | oBar.HBarType = "单据条码"; |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "启用一键扫码模式,所扫条码前缀设置错误!"; |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = e.Message + ";" + e.StackTrace; |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 一键扫码(原单据为扫码生成,对原扫描的条码进行核对) *校验模式 20251225 |
| | | |
| | | //原单据为扫码生成,对原扫描的条码进行核对 |
| | | [WebMethod] |
| | |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = e.Message + ";" + e.StackTrace; |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 扫描物料条码 启用先进先出仅提示控制,条码不在先进先出列表中允许扫描写入 *校验模式 20251225 |
| | | |
| | | //启用先进先出仅提示控制,条码不在先进先出列表中 存入条码出入库临时表 |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HOWNERID, ref string sErrMsg) |
| | | { |
| | | try |
| | | { |
| | | Int64 Type = 2; //区分先进先出是否强控制,1为强控,2为不控制 |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | |
| | | if (sBarCode.Trim() == "") |
| | | { |
| | | sErrMsg = "条码不能为空,请扫描条码!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | //判断条码是否含特殊符号 # ,如果含有则 拆分 |
| | | string[] NewBarCode; |
| | | if (sBarCode.Contains("#")) |
| | | { |
| | | NewBarCode = sBarCode.Split(Convert.ToChar("#")); |
| | | sBarCode = NewBarCode[0]; |
| | | if (HQty == 0) |
| | | { |
| | | HQty = DBUtility.ClsPub.isDoule(NewBarCode[1]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); |
| | | if (dal.GetInfoByBarCode(sBarCode, HBillType, HOWNERID)) |
| | | { |
| | | if (dal.omodel_View.HStopflag) |
| | | { |
| | | sErrMsg = "条码已被禁用,不允许扫描!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | //将托条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_PackBarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HOWNERID, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | //条码类型不为托盘条码 |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, HOWNERID, oSystemParameter.omodel, Type, ref sErrMsg)) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | oBar.HBarType = "物料条码"; |
| | | return oBar; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | return null; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //采购退料单 |
| | | else if (sHBillType == "1239") |
| | | { |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //生产退库单 |
| | | else if (sHBillType == "1245") |
| | | { |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //生产退料单 |
| | | else if (sHBillType == "1244") |
| | | { |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //销售退货单 |
| | | else if (sHBillType == "1247") |
| | | { |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //委外退料单 |
| | | else if (sHBillType == "1238") |
| | | { |
| | | //校验-是否进行源单对应条码核对('Y'为核对) |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | //原单据为扫码生成,对原扫描的条码进行核对 |