增加审核参数
This commit is contained in:
@@ -24,7 +24,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
/// </summary>
|
||||
public class clsVoucherCO_PU
|
||||
{
|
||||
protected readonly ILog logInfo = LogManager.GetLogger("logInfo");
|
||||
protected readonly ILog _logInfo = LogManager.GetLogger("logInfo");
|
||||
|
||||
private dynamic InitCo(BaseLogin login, vouchertype enmVoucherType, bool bPositive = true, string sBillType = null, string sBusType = null, UseMode UserMode = UseMode.CS, string sOverDetailsXml = null)
|
||||
{
|
||||
@@ -71,8 +71,8 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
try
|
||||
{
|
||||
var errorMsg = "";
|
||||
logInfo.Debug("开始输出登录信息");
|
||||
logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
_logInfo.Debug("开始输出登录信息");
|
||||
_logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
|
||||
var co = InitCo(baseLogin, enmVoucherType, bPositive, sBillType, sBusType, UserMode, sOverDetailsXml);
|
||||
|
||||
@@ -80,10 +80,10 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
IXMLDOMDocument2 domBody = new DOMDocument();
|
||||
IXMLDOMDocument2 domCur = new DOMDocument();
|
||||
|
||||
logInfo.Debug("开始获取单据默认模板...");
|
||||
_logInfo.Debug("开始获取单据默认模板...");
|
||||
co.GetVoucherData(ref domHead, ref domBody, "1=2");
|
||||
|
||||
logInfo.Debug("填充表头DOM...");
|
||||
_logInfo.Debug("填充表头DOM...");
|
||||
|
||||
domHead = dictionary.ToDocument2(domHead);
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
throw new Exception(errorMsg);
|
||||
}
|
||||
|
||||
logInfo.Debug($"获取新单号:{newCode}");
|
||||
_logInfo.Debug($"获取新单号:{newCode}");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(newCode))
|
||||
{
|
||||
@@ -117,16 +117,16 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
}
|
||||
}
|
||||
|
||||
logInfo.Debug("填充表体DOM...");
|
||||
_logInfo.Debug("填充表体DOM...");
|
||||
domBody = dictionarys.ToDocument2(domBody);
|
||||
|
||||
if (bPrintDom)
|
||||
{
|
||||
logInfo.Debug("开始输入DOM...");
|
||||
_logInfo.Debug("开始输入DOM...");
|
||||
|
||||
logInfo.Debug(domHead.xml);
|
||||
_logInfo.Debug(domHead.xml);
|
||||
|
||||
logInfo.Debug(domBody.xml);
|
||||
_logInfo.Debug(domBody.xml);
|
||||
}
|
||||
|
||||
object vouchId = "";
|
||||
@@ -136,16 +136,16 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
|
||||
|
||||
|
||||
logInfo.Debug($"{baseLogin.Connection.State},{baseLogin.Connection.ConnectionString}");
|
||||
_logInfo.Debug($"{baseLogin.Connection.State},{baseLogin.Connection.ConnectionString}");
|
||||
|
||||
logInfo.Debug("开始查询单据配置...");
|
||||
_logInfo.Debug("开始查询单据配置...");
|
||||
var vouchers = CommonHelper.GetVouchers(baseLogin.Connection, cardNumber);
|
||||
|
||||
var res = new BaseResult<string>();
|
||||
|
||||
if (bAudit)
|
||||
{
|
||||
logInfo.Debug("开始事务...");
|
||||
_logInfo.Debug("开始事务...");
|
||||
co.bOutTrans = true;
|
||||
|
||||
baseLogin.Connection.BeginTrans();
|
||||
@@ -154,16 +154,16 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
try
|
||||
{
|
||||
|
||||
logInfo.Debug("开始保存...");
|
||||
_logInfo.Debug("开始保存...");
|
||||
|
||||
errorMsg = bAudit
|
||||
? (string)co.VoucherSave2(ref domHead, ref domBody, VoucherState, ref vouchId, sOverDetailsXml, ref domMsg)
|
||||
: (string)co.VoucherSave(ref domHead, ref domBody, VoucherState, ref vouchId, ref curDom, UserMode, sOverDetailsXml, ref domMsg);
|
||||
|
||||
|
||||
logInfo.Debug("保存结束...");
|
||||
logInfo.Debug(errorMsg);
|
||||
logInfo.Debug($"{vouchId}");
|
||||
_logInfo.Debug("保存结束...");
|
||||
_logInfo.Debug(errorMsg);
|
||||
_logInfo.Debug($"{vouchId}");
|
||||
|
||||
res.bSuccess = string.IsNullOrWhiteSpace(errorMsg) && !string.IsNullOrWhiteSpace($"{vouchId}");
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
|
||||
res.message = "保存成功";
|
||||
|
||||
logInfo.Debug($"{baseLogin.Connection.State},{baseLogin.Connection.ConnectionString}");
|
||||
_logInfo.Debug($"{baseLogin.Connection.State},{baseLogin.Connection.ConnectionString}");
|
||||
|
||||
var strWhere = CommonHelper.GetVoucherWhereSqlById(vouchers, vouchId);
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
|
||||
if (bAudit)
|
||||
{
|
||||
logInfo.Debug("提交事务...");
|
||||
_logInfo.Debug("提交事务...");
|
||||
|
||||
baseLogin.Connection.CommitTrans();
|
||||
}
|
||||
@@ -270,7 +270,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logInfo.Error(ex.Message, ex);
|
||||
_logInfo.Error(ex.Message, ex);
|
||||
|
||||
await Task.Delay(1);
|
||||
|
||||
@@ -294,8 +294,8 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
/// <exception cref="Exception"></exception>
|
||||
public async Task<List<BaseResult<string>>> Confirm(BaseLogin baseLogin, string sCardNum, vouchertype enmVoucherType, List<string> cCodes, bool bPositive = true, string sBillType = null, string sBusType = null, UseMode UserMode = UseMode.CS, string sOverDetailsXml = null)
|
||||
{
|
||||
logInfo.Debug("开始输出登录信息");
|
||||
logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
_logInfo.Debug("开始输出登录信息");
|
||||
_logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
|
||||
var co = InitCo(baseLogin, enmVoucherType, bPositive, sBillType, sBusType, UserMode, sOverDetailsXml);
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
catch (Exception ex)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
logInfo.Error(ex.Message, ex);
|
||||
_logInfo.Error(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
IXMLDOMDocument2 domBody = new DOMDocument();
|
||||
IXMLDOMDocument2 domMsg = new DOMDocument();
|
||||
|
||||
logInfo.Debug("开始获取单据数据...");
|
||||
_logInfo.Debug("开始获取单据数据...");
|
||||
voucherCO.GetVoucherData(ref domHead, ref domBody, strWhere);
|
||||
|
||||
var res = new BaseResult<string>
|
||||
@@ -525,8 +525,8 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
/// <exception cref="Exception"></exception>
|
||||
public async Task<List<BaseResult<string>>> CancelConfirm(BaseLogin baseLogin, string sCardNum, vouchertype enmVoucherType, List<string> cCodes, bool bPositive = true, string sBillType = null, string sBusType = null, UseMode UserMode = UseMode.CS, string sOverDetailsXml = null)
|
||||
{
|
||||
logInfo.Debug("开始输出登录信息");
|
||||
logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
_logInfo.Debug("开始输出登录信息");
|
||||
_logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
|
||||
var co = InitCo(baseLogin, enmVoucherType, bPositive, sBillType, sBusType, UserMode, sOverDetailsXml);
|
||||
|
||||
@@ -551,7 +551,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
catch (Exception ex)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
logInfo.Error(ex.Message, ex);
|
||||
_logInfo.Error(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
IXMLDOMDocument2 domBody = new DOMDocument();
|
||||
IXMLDOMDocument2 domMsg = new DOMDocument();
|
||||
|
||||
logInfo.Debug("开始获取单据数据...");
|
||||
_logInfo.Debug("开始获取单据数据...");
|
||||
voucherCO.GetVoucherData(ref domHead, ref domBody, strWhere);
|
||||
|
||||
var res = new BaseResult<string>
|
||||
@@ -749,8 +749,8 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
/// <exception cref="Exception"></exception>
|
||||
public async Task<List<BaseResult<string>>> Delete(BaseLogin baseLogin, string sCardNum, vouchertype enmVoucherType, List<string> cCodes, bool bPositive = true, string sBillType = null, string sBusType = null, UseMode UserMode = UseMode.CS, string sOverDetailsXml = null)
|
||||
{
|
||||
logInfo.Debug("开始输出登录信息");
|
||||
logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
_logInfo.Debug("开始输出登录信息");
|
||||
_logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
|
||||
var co = InitCo(baseLogin, enmVoucherType, bPositive, sBillType, sBusType, UserMode, sOverDetailsXml);
|
||||
|
||||
@@ -775,7 +775,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
catch (Exception ex)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
logInfo.Error(ex.Message, ex);
|
||||
_logInfo.Error(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -897,7 +897,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.PU
|
||||
IXMLDOMDocument2 domBody = new DOMDocument();
|
||||
IXMLDOMDocument2 domMsg = new DOMDocument();
|
||||
|
||||
logInfo.Debug("开始获取单据数据...");
|
||||
_logInfo.Debug("开始获取单据数据...");
|
||||
voucherCO.GetVoucherData(ref domHead, ref domBody, strWhere);
|
||||
|
||||
var res = new BaseResult<string>
|
||||
|
||||
Reference in New Issue
Block a user