采购入库成功

This commit is contained in:
admin
2021-01-07 14:06:26 +08:00
parent b5c01d31be
commit 7245c08c94
11 changed files with 543 additions and 61 deletions

View File

@@ -135,14 +135,14 @@ namespace NX.ERP.U8
}
public void AddRdVoucher(VoucherParameter para)
public void AddRdVoucher(string URL,VoucherParameter para)
{
try
{
U8EnvContext u8EnvContext = new U8EnvContext();
u8EnvContext.U8Login =this.ClsLogin;
U8ApiAddress apiAddress = new U8ApiAddress("");
U8ApiAddress apiAddress = new U8ApiAddress(URL);
U8ApiBroker u8ApiBroker = new U8ApiBroker(apiAddress, u8EnvContext);
u8ApiBroker.AssignNormalValue("sVouchType", para.VoucherType);
u8ApiBroker.AssignNormalValue("DomHead", para.DomHead);
@@ -151,7 +151,8 @@ namespace NX.ERP.U8
{
u8ApiBroker.AssignNormalValue("domPosition", para.DomPosition);
}
u8ApiBroker.AssignNormalValue("cnnFrom", para.Connection);
u8ApiBroker.AssignNormalValue("cnnFrom", null);
if (para.DOMMsg != null)
{
u8ApiBroker.AssignNormalValue("domMsg", para.DOMMsg);
@@ -207,7 +208,7 @@ namespace NX.ERP.U8
}
else if (para.VoucherType.Equals("19"))
{
// para.VoucherCode = base.Util.GetAdjustVoucherCode(para.VoucherId);
// para.VoucherCode = base.Util.GetAdjustVoucherCode(para.VoucherId);
//if (base.Util.dbHelper.U8ExcuteNoneQuery("Update AdjustPVouchs Set cVouchCode = '" + para.VoucherCode + "' Where id = " + para.VoucherId) == 0)
//{
// para.ErrMsg = "更新货位调整单子表单号失败!";
@@ -219,15 +220,94 @@ namespace NX.ERP.U8
//para.VoucherCode = base.Util.GetSTVoucherCode(para.VoucherId, para.VoucherType);
}
}
else
{
throw new Exception(para.ErrMsg);
}
u8ApiBroker.Release();
}
catch (Exception ex3)
{
// Log.WriteLog(ex3);
throw new Exception("增加供应链库存单据失败!");
throw ex3;
}
}
public void LoadRdVoucher(VoucherParameter para)
{
try
{
U8EnvContext u8EnvContext = new U8EnvContext();
u8EnvContext.U8Login = this.ClsLogin;
U8ApiAddress apiAddress = new U8ApiAddress("U8API/PuStoreIn/Load");
U8ApiBroker u8ApiBroker = new U8ApiBroker(apiAddress, u8EnvContext);
u8ApiBroker.AssignNormalValue("sVouchType", para.VoucherType);
u8ApiBroker.AssignNormalValue("sWhere", para.StrWhere);
u8ApiBroker.AssignNormalValue("domPos", new DOMDocumentClass());
u8ApiBroker.AssignNormalValue("bGetBlank", para.IsGetBlank);
u8ApiBroker.AssignNormalValue("sBodyWhere_Order", para.SBodyWhere_Order);
if (!u8ApiBroker.Invoke())
{
Exception exception = u8ApiBroker.GetException();
if (exception != null)
{
if (exception is MomSysException)
{
MomSysException ex = exception as MomSysException;
}
else if (exception is MomBizException)
{
MomBizException ex2 = exception as MomBizException;
}
string exceptionString = u8ApiBroker.GetExceptionString();
if (exceptionString.Length != 0)
{
}
}
para.ReturnValue = false;
u8ApiBroker.Release();
return;
}
DOMDocument dOMDocument = u8ApiBroker.GetResult("DomHead") as DOMDocument;
if (dOMDocument != null)
{
para.DomHead = new DOMDocumentClass();
para.DomHead.loadXML(dOMDocument.xml);
}
DOMDocument dOMDocument2 = u8ApiBroker.GetResult("domBody") as DOMDocument;
if (dOMDocument2 != null)
{
para.DomBody = new DOMDocumentClass();
para.DomBody.loadXML(dOMDocument2.xml);
}
DOMDocument dOMDocument3 = u8ApiBroker.GetResult("domPos") as DOMDocument;
if (dOMDocument3 != null)
{
para.DomPosition = new DOMDocumentClass();
para.DomPosition.loadXML(dOMDocument3.xml);
}
para.ReturnValue = Convert.ToBoolean(u8ApiBroker.GetReturnValue());
para.ErrMsg = u8ApiBroker.GetResult("errMsg") as string;
u8ApiBroker.Release();
}
catch (Exception ex3)
{
throw new Exception("装载供应链库存单据失败!");
}
}
}
}