1.完成销售管理模块
2.修复档案查询与新增单据查询
This commit is contained in:
@@ -27,17 +27,28 @@ namespace UFIDA.U8.Framework.Api.ControlObject.SA
|
||||
{
|
||||
var errorMsg = "";
|
||||
|
||||
dynamic objr = new object();
|
||||
var aaa = "";
|
||||
var oSystem = "USSAServer.clsSystem".GetComObject();
|
||||
|
||||
if (!oSystem.Init(login._vbLogin, ref errorMsg))
|
||||
{
|
||||
throw new Exception($"初始化失败:{errorMsg}");
|
||||
}
|
||||
|
||||
var co = "VoucherCO_Sa.ClsVoucherCO_SA".GetComObject();
|
||||
|
||||
co.Init(enmVoucherType: enmVoucherType, oLogin: ref login._vbLogin, oConn: ref login.Connection);
|
||||
try
|
||||
{
|
||||
co.Init(enmVoucherType: enmVoucherType, oLogin: ref login._vbLogin, oConn: ref login.Connection, sysObj: oSystem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception($"初始化失败:{ex.Message}");
|
||||
}
|
||||
|
||||
return co;
|
||||
}
|
||||
|
||||
public async Task<BaseResult<string>> Save(BaseLogin baseLogin, Dictionary<string, object> dictionary, string cardNumber, VoucherTypeSA enmVoucherType,int VoucherState=0, bool bGetCode = false, string codeKey = null, bool bAudit = false, bool iswfcontrolled = false, string cFlowFieldName = "IsWfControlled")
|
||||
public async Task<BaseResult<string>> Save(BaseLogin baseLogin, Dictionary<string, object> dictionary, string cardNumber, VoucherTypeSA enmVoucherType, int VoucherState = 0, bool bGetCode = false, string codeKey = null, bool bAudit = false, bool iswfcontrolled = false, string cFlowFieldName = "IsWfControlled")
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -102,15 +113,10 @@ namespace UFIDA.U8.Framework.Api.ControlObject.SA
|
||||
|
||||
var res = new BaseResult<string>();
|
||||
|
||||
baseLogin.Connection.BeginTrans();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
_logInfo.Debug("开始保存...");
|
||||
|
||||
errorMsg = co.Save(ref domHead, ref domBody, VoucherState, ref vouchId,ref domCur);
|
||||
|
||||
errorMsg = co.Save(ref domHead, ref domBody, VoucherState, ref vouchId, ref domCur);
|
||||
|
||||
_logInfo.Debug("保存结束...");
|
||||
_logInfo.Debug(errorMsg);
|
||||
@@ -153,28 +159,12 @@ namespace UFIDA.U8.Framework.Api.ControlObject.SA
|
||||
res.voucherId = $"{vouchId}";
|
||||
res.result = errorMsg;
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (bAudit)
|
||||
baseLogin.Connection.RollbackTrans();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Trace.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
if (!res.bSuccess)
|
||||
{
|
||||
res.message = "保存失败";
|
||||
if (bAudit)
|
||||
baseLogin.Connection.RollbackTrans();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -192,14 +182,12 @@ namespace UFIDA.U8.Framework.Api.ControlObject.SA
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(errorMsg))
|
||||
{
|
||||
baseLogin.Connection.RollbackTrans();
|
||||
|
||||
throw new Exception(errorMsg);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
baseLogin.Connection.RollbackTrans();
|
||||
res.bSuccess = false;
|
||||
throw;
|
||||
}
|
||||
@@ -207,10 +195,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.SA
|
||||
|
||||
_logInfo.Debug("提交事务...");
|
||||
|
||||
baseLogin.Connection.CommitTrans();
|
||||
|
||||
|
||||
return res;
|
||||
return res;
|
||||
|
||||
|
||||
}
|
||||
@@ -224,7 +209,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.SA
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<BaseResult<string>> VerifyVouch(dynamic voucherCO, Connection conn, VoucherTypeSA sVouchType, string cCode, object vouchId, string strWhere,bool bVerify)
|
||||
public async Task<BaseResult<string>> VerifyVouch(dynamic voucherCO, Connection conn, VoucherTypeSA sVouchType, string cCode, object vouchId, string strWhere, bool bVerify)
|
||||
{
|
||||
IXMLDOMDocument2 domHead = new DOMDocument();
|
||||
IXMLDOMDocument2 domBody = new DOMDocument();
|
||||
|
||||
Reference in New Issue
Block a user