提交修改

This commit is contained in:
邱敏健
2024-12-15 15:59:23 +08:00
parent 8cb6b0cb0b
commit 3a6e2e1311
2 changed files with 16 additions and 5 deletions
@@ -3,6 +3,7 @@ using MSXML2;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web;
using UFIDA.U8.Framework.Api.ControlObject.Common; using UFIDA.U8.Framework.Api.ControlObject.Common;
using UFIDA.U8.Framework.Api.ControlObject.Entity; using UFIDA.U8.Framework.Api.ControlObject.Entity;
using UFIDA.U8.Framework.Api.ControlObject.Json; using UFIDA.U8.Framework.Api.ControlObject.Json;
@@ -18,7 +19,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
protected readonly ILog logInfo = LogManager.GetLogger("logInfo"); protected readonly ILog logInfo = LogManager.GetLogger("logInfo");
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) public async Task<BaseResult<string>> Insert(BaseLogin baseLogin, Dictionary<string, object> dictionary,string cCardNum, string sVouchType,bool bGetCode=false,string codeKey="",bool bCheck=true,bool bBeforCheckStock=true,bool bIsRedVouch=false,string sAddedState="", bool bReMote=false)
{ {
try try
{ {
@@ -32,7 +33,17 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
throw new Exception(errorMsg); throw new Exception(errorMsg);
} }
var domHead = dictionary.ToDocument2(); IXMLDOMDocument2 domHead = new DOMDocument();
IXMLDOMDocument2 domBody = new DOMDocument();
IXMLDOMDocument2 domPosition = new DOMDocument();
errorMsg = "";
if (!co.GetDefaultVoucherDom(sVouchType, cCardNum, ref domHead, ref domBody, ref domPosition, ref errorMsg))
{
throw new Exception(errorMsg);
}
domHead = dictionary.ToDocument2(domHead);
if (!dictionary.TryGetValue("body", out var bodys)) if (!dictionary.TryGetValue("body", out var bodys))
{ {
@@ -60,8 +71,8 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
} }
var domBody = dictionarys.ToDocument2(); domBody = dictionarys.ToDocument2(domBody);
IXMLDOMDocument2 domPosition = new DOMDocument();
IXMLDOMDocument2 domMsg = new DOMDocument(); IXMLDOMDocument2 domMsg = new DOMDocument();
errorMsg = ""; errorMsg = "";
baseLogin.Connection.BeginTrans(); baseLogin.Connection.BeginTrans();
@@ -237,7 +237,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
var co = new USERPCO(); var co = new USERPCO();
var res = await co.Insert(baseLogin, input, voucherInfo.VoucherType, bGetCode, codeKey, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote); var res = await co.Insert(baseLogin, input, cCardNum, voucherInfo.VoucherType, bGetCode, codeKey, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote);
return res; return res;
} }