提交测试
This commit is contained in:
@@ -18,7 +18,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
protected readonly ILog logInfo = LogManager.GetLogger("logInfo");
|
||||
|
||||
|
||||
public async Task<BaseResult<string>> Insert(BaseLogin baseLogin, Dictionary<string, object> dictionary,string sVouchType,bool bGetCode=false,bool bCheck=true,bool bBeforCheckStock=true,bool bIsRedVouch=false,string sAddedState="", bool bReMote=false)
|
||||
public async Task<BaseResult<string>> Insert(BaseLogin baseLogin, Dictionary<string, object> dictionary,string sVouchType,bool bGetCode=false,string codeKey="",bool bCheck=true,bool bBeforCheckStock=true,bool bIsRedVouch=false,string sAddedState="", bool bReMote=false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -46,6 +46,18 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
throw new Exception("无法获取表体数据");
|
||||
}
|
||||
|
||||
if (bGetCode && !string.IsNullOrWhiteSpace(codeKey))
|
||||
{
|
||||
errorMsg = "";
|
||||
var newCode = co.GetNewVouchCode(sVouchType, domHead, ref errorMsg);
|
||||
|
||||
logInfo.Debug($"获取新单号:{newCode}");
|
||||
//if (!string.IsNullOrWhiteSpace(newCode))
|
||||
//{
|
||||
// object value = domHead.SetDomKeyValue(codeKey, newCode);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
var domBody = dictionarys.ToDocument2();
|
||||
IXMLDOMDocument2 domPosition = new DOMDocument();
|
||||
@@ -57,7 +69,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
var res = new BaseResult<string>();
|
||||
try
|
||||
{
|
||||
res.bSuccess = co.Update(sVouchType, domHead, domBody, domPosition, ref errorMsg, baseLogin.Connection, ref vouchId, ref domMsg, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote);
|
||||
res.bSuccess = co.Insert(sVouchType, domHead, domBody, domPosition, ref errorMsg, baseLogin.Connection, ref vouchId, ref domMsg, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user