1.修复调拨单无法自动审核其他出入库单的问题
2.调整登录,去除多次试错
This commit is contained in:
@@ -3,6 +3,9 @@ using log4net;
|
||||
using MSXML2;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading.Tasks;
|
||||
using UFIDA.U8.Framework.Api.ControlObject.Common;
|
||||
using UFIDA.U8.Framework.Api.ControlObject.Entity;
|
||||
@@ -21,7 +24,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
/// </summary>
|
||||
public class USERPCO
|
||||
{
|
||||
protected readonly ILog logInfo = LogManager.GetLogger("logInfo");
|
||||
private readonly ILog _logInfo = LogManager.GetLogger("_logInfo");
|
||||
|
||||
/// <summary>
|
||||
/// 新增单据
|
||||
@@ -41,15 +44,15 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
/// <param name="bPrintDom"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
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, bool bAudit = false, bool bPrintDom = 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, bool bAudit = false, bool bPrintDom = false,bool bVerify=false)
|
||||
{
|
||||
try
|
||||
{
|
||||
var co = "USERPCO.VoucherCO".GetComObject();
|
||||
|
||||
var errorMsg = "";
|
||||
logInfo.Debug("开始输出登录信息");
|
||||
logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
_logInfo.Debug("开始输出登录信息");
|
||||
_logInfo.Debug(baseLogin._vbLogin.userToken);
|
||||
|
||||
if (!co.IniLogin(baseLogin._vbLogin, ref errorMsg))
|
||||
{
|
||||
@@ -65,7 +68,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
|
||||
try
|
||||
{
|
||||
logInfo.Debug("开始获取单据默认模板...");
|
||||
_logInfo.Debug("开始获取单据默认模板...");
|
||||
|
||||
if (!co.GetDefaultVoucherDom(sVouchType, cCardNum, ref domHead, ref domBody, ref domPosition, ref errorMsg) || !string.IsNullOrWhiteSpace(errorMsg))
|
||||
{
|
||||
@@ -74,11 +77,11 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logInfo.Error($"获取单据默认模板失败,错误信息:{ex.Message}", ex);
|
||||
_logInfo.Error($"获取单据默认模板失败,错误信息:{ex.Message}", ex);
|
||||
|
||||
errorMsg = "";
|
||||
|
||||
logInfo.Debug($"开始读取单据数据,当前单据编码:{cCardNum}");
|
||||
_logInfo.Debug($"开始读取单据数据,当前单据编码:{cCardNum}");
|
||||
|
||||
if (!co.Load(sVouchType, "1=2", ref domHead, ref domBody, ref domPosition, ref errorMsg, true) || !string.IsNullOrWhiteSpace(errorMsg))
|
||||
{
|
||||
@@ -87,7 +90,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
|
||||
}
|
||||
|
||||
logInfo.Debug("填充表头DOM...");
|
||||
_logInfo.Debug("填充表头DOM...");
|
||||
|
||||
domHead = dictionary.ToDocument2(domHead);
|
||||
|
||||
@@ -108,7 +111,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
errorMsg = "";
|
||||
var newCode = co.GetNewVouchCode(sVouchType, domHead, ref errorMsg);
|
||||
|
||||
logInfo.Debug($"获取新单号:{newCode}");
|
||||
_logInfo.Debug($"获取新单号:{newCode}");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(newCode))
|
||||
{
|
||||
@@ -116,7 +119,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
}
|
||||
}
|
||||
|
||||
logInfo.Debug("填充表体DOM...");
|
||||
_logInfo.Debug("填充表体DOM...");
|
||||
domBody = dictionarys.ToDocument2(domBody);
|
||||
|
||||
IXMLDOMDocument2 domMsg = new DOMDocument();
|
||||
@@ -132,27 +135,29 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
{
|
||||
if (bPrintDom)
|
||||
{
|
||||
logInfo.Debug("开始输入DOM...");
|
||||
_logInfo.Debug("开始输入DOM...");
|
||||
|
||||
logInfo.Debug(domHead.xml);
|
||||
_logInfo.Debug(domHead.xml);
|
||||
|
||||
logInfo.Debug(domBody.xml);
|
||||
_logInfo.Debug(domBody.xml);
|
||||
|
||||
logInfo.Debug(domPosition.xml);
|
||||
_logInfo.Debug(domPosition.xml);
|
||||
}
|
||||
|
||||
logInfo.Debug("执行插入操作...");
|
||||
_logInfo.Debug("执行插入操作...");
|
||||
res.bSuccess = co.Insert(sVouchType, domHead, domBody, null, ref errorMsg, baseLogin.Connection, ref vouchId, ref domMsg, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote);
|
||||
|
||||
if (res.bSuccess)
|
||||
{
|
||||
res.voucherId = $"{vouchId}";
|
||||
logInfo.Debug($"操作完成,操作结果:成功!------[{vouchId}]------[{errorMsg}]------[{domMsg.xml}]");
|
||||
_logInfo.Debug($"操作完成,操作结果:成功!------[{vouchId}]------[{errorMsg}]------[{domMsg.xml}]");
|
||||
|
||||
res.voucherCode = CommonHelper.GetVoucherCode(baseLogin.Connection, vouchId, vouchers);
|
||||
|
||||
if (bAudit)
|
||||
{
|
||||
_logInfo.Debug($"当前单据号:{res.voucherCode},开始审核操作");
|
||||
|
||||
var res2 = co.Verify(sVouchType, vouchId, ref errorMsg, baseLogin.Connection, null, ref domMsg);
|
||||
|
||||
if (!res2)
|
||||
@@ -165,6 +170,94 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
|
||||
throw new Exception("审核单据时发生异常,请检查数据");
|
||||
}
|
||||
|
||||
_logInfo.Debug($"当前单据号:{res.voucherCode},操作完成,操作结果:成功!------[{vouchId}]------[{errorMsg}]------[{domMsg.xml}]");
|
||||
|
||||
if (bVerify && cCardNum=="0304")
|
||||
{
|
||||
_logInfo.Debug($"0304,当前单据号:{res.voucherCode},开始审核其他出入库单据");
|
||||
|
||||
var strSql = $"select ID,cCode from RdRecord09 where (isnull(iverifystate,0)=0 or dVeriDate is null) and cSource='调拨' and cBusCode='{res.voucherCode}'";
|
||||
|
||||
var rst = new Recordset();
|
||||
|
||||
rst.Open(strSql, baseLogin.Connection);
|
||||
|
||||
if (!rst.BOF && !rst.EOF)
|
||||
{
|
||||
var outId = $"{rst.Fields["ID"].Value}";
|
||||
var outCode = $"{rst.Fields["cCode"].Value}";
|
||||
|
||||
errorMsg = "";
|
||||
domMsg = new DOMDocument();
|
||||
|
||||
_logInfo.Debug($"0304,当前单据号:{res.voucherCode},其他出库单:{outCode},开始审核其他出库单");
|
||||
|
||||
var resOut = co.Verify("09", outId, ref errorMsg, baseLogin.Connection, null, ref domMsg);
|
||||
|
||||
if (!resOut)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(errorMsg))
|
||||
throw new Exception($"审核其他出库单时发生异常,错误信息:{errorMsg}");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(domMsg.xml))
|
||||
throw new Exception($"审核其他出库单时发生异常,零出库控制:{domMsg.xml}");
|
||||
|
||||
throw new Exception("审核其他出库单时发生异常,请检查数据");
|
||||
}
|
||||
|
||||
_logInfo.Debug($"0304,当前单据号:{res.voucherCode},其他出库单:{outCode},审核其他出库单完成,操作结果:成功!------[{outId}]------[{errorMsg}]------[{domMsg.xml}]");
|
||||
}
|
||||
|
||||
rst.Close();
|
||||
|
||||
strSql = $"select ID,cCode from RdRecord08 where (isnull(iverifystate,0)=0 or dVeriDate is null) and cSource='调拨' and cBusCode='{res.voucherCode}'";
|
||||
|
||||
var rst2 = new Recordset();
|
||||
|
||||
rst2.Open(strSql, baseLogin.Connection);
|
||||
|
||||
if (!rst2.BOF && !rst2.EOF)
|
||||
{
|
||||
var inId = $"{rst2.Fields["ID"].Value}";
|
||||
var inCode = $"{rst2.Fields["cCode"].Value}";
|
||||
|
||||
errorMsg = "";
|
||||
domMsg = new DOMDocument();
|
||||
|
||||
_logInfo.Debug($"0304,当前单据号:{res.voucherCode},其他入库单:{inId},开始审核其他入库单");
|
||||
|
||||
var resIn = co.Verify("08", inId, ref errorMsg, baseLogin.Connection, null, ref domMsg);
|
||||
|
||||
if (!resIn)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(errorMsg))
|
||||
throw new Exception($"审核其他入库单时发生异常,错误信息:{errorMsg}");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(domMsg.xml))
|
||||
throw new Exception($"审核其他入库单时发生异常,零出库控制:{domMsg.xml}");
|
||||
|
||||
throw new Exception("审核其他入库单时发生异常,请检查数据");
|
||||
}
|
||||
|
||||
_logInfo.Debug($"0304,当前单据号:{res.voucherCode},其他入库单:{inCode},审核其他入库单完成,操作结果:成功!------[{inId}]------[{errorMsg}]------[{domMsg.xml}]");
|
||||
}
|
||||
|
||||
rst2.Close();
|
||||
}
|
||||
|
||||
//try
|
||||
//{
|
||||
// var strSql = $"UPDATE {vouchers.cBTTblName} SET cHandler = '{dictionary["cmaker"]}' WHERE {vouchers.voucherIdFieldName}={vouchId}";
|
||||
|
||||
// object rsts = new Recordset();
|
||||
|
||||
// baseLogin.Connection.Execute(strSql, out rsts);
|
||||
//}
|
||||
//catch(Exception ex)
|
||||
//{
|
||||
// _logInfo.Error($"更新审核人时发生异常,错误信息:{ex.Message}", ex);
|
||||
//}
|
||||
}
|
||||
|
||||
baseLogin.Connection.CommitTrans();
|
||||
@@ -174,7 +267,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
}
|
||||
else
|
||||
{
|
||||
logInfo.Debug($"操作完成,操作结果:失败!------[{vouchId}]------[{errorMsg}]------[{domMsg.xml}]");
|
||||
_logInfo.Debug($"操作完成,操作结果:失败!------[{vouchId}]------[{errorMsg}]------[{domMsg.xml}]");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(errorMsg))
|
||||
throw new Exception(errorMsg);
|
||||
@@ -197,7 +290,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logInfo.Error(ex.Message, ex);
|
||||
_logInfo.Error(ex.Message, ex);
|
||||
|
||||
await Task.Delay(1);
|
||||
|
||||
@@ -265,13 +358,13 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
|
||||
if (bPrintDom)
|
||||
{
|
||||
logInfo.Debug("开始输入DOM...");
|
||||
_logInfo.Debug("开始输入DOM...");
|
||||
|
||||
logInfo.Debug(domHead.xml);
|
||||
_logInfo.Debug(domHead.xml);
|
||||
|
||||
logInfo.Debug(domBody.xml);
|
||||
_logInfo.Debug(domBody.xml);
|
||||
|
||||
logInfo.Debug(domPosition.xml);
|
||||
_logInfo.Debug(domPosition.xml);
|
||||
}
|
||||
|
||||
//IXMLDOMDocument2 domMsg = new DOMDocument();
|
||||
@@ -312,7 +405,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logInfo.Error(ex.Message, ex);
|
||||
_logInfo.Error(ex.Message, ex);
|
||||
|
||||
return new BaseResult<string> { bSuccess = false, message = "新增失败", result = ex.Message };
|
||||
}
|
||||
|
||||
@@ -91,9 +91,21 @@ namespace UFIDA.U8.Framework.Api.ControlObject.U8M
|
||||
/// <exception cref="Exception"></exception>
|
||||
public void Init(LoginParamter paramter, bool bMon = true, int traceTimes = 0)
|
||||
{
|
||||
var lastError = "";
|
||||
|
||||
|
||||
if (traceTimes > 5)
|
||||
throw new Exception("U8登录异常");
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(lastError))
|
||||
{
|
||||
throw new Exception("U8登录异常");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(lastError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
@@ -126,7 +138,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.U8M
|
||||
|
||||
if (!_vbLogin.Login(paramter.pSubId, paramter.pAccId, paramter.pYearId, paramter.pUserId, paramter.pPassword, paramter.pDate, paramter.cSrv, paramter.cSerial) && string.IsNullOrWhiteSpace(_vbLogin.userToken))
|
||||
{
|
||||
throw new Exception($"VB--U8登录失败---{_vbLogin.ShareString}");
|
||||
throw new Exception($"U8登录失败---{_vbLogin.ShareString}");
|
||||
}
|
||||
|
||||
_logInfo.Debug($"VB--开始创建连接对象:{_vbLogin.userToken}");
|
||||
@@ -381,7 +393,9 @@ namespace UFIDA.U8.Framework.Api.ControlObject.U8M
|
||||
{
|
||||
_logInfo.Error($"重试次数:{traceTimes},错误信息:{ex.Message}", ex);
|
||||
|
||||
Init(paramter, bMon, traceTimes + 1);
|
||||
lastError = ex.Message;
|
||||
|
||||
//Init(paramter, bMon, traceTimes + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -244,5 +246,8 @@
|
||||
<Name>UFIDA.U8.Framework.Api.Common</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -12,4 +12,22 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<system.serviceModel>
|
||||
<bindings>
|
||||
<basicHttpBinding>
|
||||
<binding name="U8LoginServicesSoap" />
|
||||
<binding name="U8LoginServicesSoap1" />
|
||||
</basicHttpBinding>
|
||||
</bindings>
|
||||
<client>
|
||||
<endpoint address="http://192.168.110.62/U8Application/U8LoginServices.asmx"
|
||||
binding="basicHttpBinding" bindingConfiguration="U8LoginServicesSoap"
|
||||
contract="UFIDA.U8.Framework.Api.U8Service.U8LoginServicesSoap"
|
||||
name="U8LoginServicesSoap" />
|
||||
<endpoint address="http://192.168.110.62/U8Application/U8LoginServices.asmx"
|
||||
binding="basicHttpBinding" bindingConfiguration="U8LoginServicesSoap1"
|
||||
contract="UFIDA.U8.Framework.U8Service.U8LoginServicesSoap"
|
||||
name="U8LoginServicesSoap1" />
|
||||
</client>
|
||||
</system.serviceModel>
|
||||
</configuration>
|
||||
Binary file not shown.
@@ -1,15 +1,16 @@
|
||||
using System;
|
||||
using log4net;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ServiceModel;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Description;
|
||||
using System.Web.UI.WebControls;
|
||||
using log4net;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using SqlSugar;
|
||||
using UFIDA.U8.Framework.Api.Common.Entity;
|
||||
using UFIDA.U8.Framework.Api.ControlObject.Common;
|
||||
using UFIDA.U8.Framework.Api.ControlObject.Entity;
|
||||
@@ -139,7 +140,6 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取U8密码
|
||||
/// </summary>
|
||||
@@ -491,7 +491,6 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
|
||||
return new BaseResult<long>() { bSuccess = false, message = "子系统初始化失败", result = 0 };
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,10 +48,15 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("api/U8/ST/{cCardNum}/Insert")]
|
||||
public async Task<BaseResult<string>> Insert(string cAccId ,string cCardNum,[FromBody] Dictionary<string, object> input, bool bCheck = true,bool bBeforCheckStock=true,bool bIsRedVouch=false,string sAddedState="",bool bReMote=false,bool? bVerify=null)
|
||||
public async Task<BaseResult<string>> Insert(string cAccId, string cCardNum, [FromBody] Dictionary<string, object> input, bool bCheck = true, bool bBeforCheckStock = true, bool bIsRedVouch = false, string sAddedState = "", bool bReMote = false, bool? bVerify = null, bool? bVerify2 = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Request.Headers.TryGetValues("userToken", out var values))
|
||||
{
|
||||
return await InsertToken(cCardNum, input, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote, bVerify);
|
||||
}
|
||||
|
||||
var db = CommUnit.GetDbClient();
|
||||
|
||||
var workId = SnowFlakeSingle.Instance.NextId();
|
||||
@@ -88,7 +93,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
|
||||
var voucherInfo = await db.Queryable<SysU8VoucherDefine>().FirstAsync(s => s.CardNumber == cCardNum);
|
||||
|
||||
var defs = await db.Queryable<SysU8FieldDefine>().Where(s => s.CardNumber == cCardNum && s.cPosition == "H" && s.bEnable==true).ToListAsync(); //查询表头字段配置,供后续设置字段值
|
||||
var defs = await db.Queryable<SysU8FieldDefine>().Where(s => s.CardNumber == cCardNum && s.cPosition == "H" && s.bEnable == true).ToListAsync(); //查询表头字段配置,供后续设置字段值
|
||||
|
||||
var dateKey = "";
|
||||
var exchKey = "";
|
||||
@@ -123,7 +128,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
var bGetCode = false;
|
||||
var codeKey = "";
|
||||
|
||||
if (defs.Any(a => a.bDefault == true && a.cPosition == "H" && a.DefaultValue == "单号" && a.bEnable==true))
|
||||
if (defs.Any(a => a.bDefault == true && a.cPosition == "H" && a.DefaultValue == "单号" && a.bEnable == true))
|
||||
{
|
||||
bGetCode = true;
|
||||
codeKey = defs
|
||||
@@ -162,7 +167,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
throw new Exception("无表体数据!");
|
||||
|
||||
_logInfo.Debug($"作业Id:{workId}-----获取表体字段配置");
|
||||
var defsBody = await db.Queryable<SysU8FieldDefine>().Where(s => s.CardNumber == cCardNum && s.cPosition == "B" && s.bEnable==true).ToListAsync(); //获取表体的字段配置
|
||||
var defsBody = await db.Queryable<SysU8FieldDefine>().Where(s => s.CardNumber == cCardNum && s.cPosition == "B" && s.bEnable == true).ToListAsync(); //获取表体的字段配置
|
||||
|
||||
var rowNo = 1;
|
||||
|
||||
@@ -243,7 +248,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
|
||||
var co = new USERPCO();
|
||||
|
||||
var res = await co.Insert(baseLogin, input, cCardNum, voucherInfo.VoucherType, bGetCode, codeKey, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote, bVerify??voucherInfo.bVerify,voucherInfo.bPrintDom);
|
||||
var res = await co.Insert(baseLogin, input, cCardNum, voucherInfo.VoucherType, bGetCode, codeKey, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote, bVerify ?? voucherInfo.bVerify, voucherInfo.bPrintDom, bVerify2 ?? false);
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -270,7 +275,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("api/U8/ST/{cCardNum}/Insert/Token")]
|
||||
public async Task<BaseResult<string>> InsertToken(string cCardNum, [FromBody] Dictionary<string, object> input, bool bCheck = true, bool bBeforCheckStock = true, bool bIsRedVouch = false, string sAddedState = "", bool bReMote = false, bool? bVerify = null)
|
||||
public async Task<BaseResult<string>> InsertToken(string cCardNum, [FromBody] Dictionary<string, object> input, bool bCheck = true, bool bBeforCheckStock = true, bool bIsRedVouch = false, string sAddedState = "", bool bReMote = false, bool? bVerify = null, bool? bVerify2 = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -468,7 +473,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
|
||||
var co = new USERPCO();
|
||||
|
||||
var res = await co.Insert(baseLogin, input, cCardNum, voucherInfo.VoucherType, bGetCode, codeKey, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote, bVerify??voucherInfo.bVerify, voucherInfo.bPrintDom);
|
||||
var res = await co.Insert(baseLogin, input, cCardNum, voucherInfo.VoucherType, bGetCode, codeKey, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote, bVerify ?? voucherInfo.bVerify, voucherInfo.bPrintDom, bVerify2 ?? false);
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -714,7 +719,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
/// <exception cref="Exception"></exception>
|
||||
[HttpGet]
|
||||
[Route("api/U8/ST/{cCardNum}/Verify/Code")]
|
||||
public async Task<BaseResult<string>> Verify(string cAccId, string cCardNum,string cCode, bool bCheck = true, bool bBeforCheckStock = true, bool bList = false)
|
||||
public async Task<BaseResult<string>> Verify(string cAccId, string cCardNum, string cCode, bool bCheck = true, bool bBeforCheckStock = true, bool bList = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -726,7 +731,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
|
||||
//LoginParamter param;
|
||||
|
||||
if (!_cache.TryGetValue($"U8_{cAccId}", out BaseLogin baseLogin) || baseLogin ==null)
|
||||
if (!_cache.TryGetValue($"U8_{cAccId}", out BaseLogin baseLogin) || baseLogin == null)
|
||||
{
|
||||
_logInfo.Debug($"作业Id:{workId}-----未获取到缓存的登录信息,正在重新构建");
|
||||
|
||||
@@ -860,7 +865,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
|
||||
var voucherIds = input.voucherId;
|
||||
|
||||
if ((cCodes == null || cCodes.Count<=0) && (voucherIds == null || voucherIds.Count <= 0))
|
||||
if ((cCodes == null || cCodes.Count <= 0) && (voucherIds == null || voucherIds.Count <= 0))
|
||||
{
|
||||
throw new Exception("没有数据需要审核");
|
||||
}
|
||||
@@ -948,7 +953,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
/// <exception cref="Exception"></exception>
|
||||
[HttpGet]
|
||||
[Route("api/U8/ST/{cCardNum}/UnVerify/Code")]
|
||||
public async Task<BaseResult<string>> UnVerify(string cAccId, string cCardNum,string cCode, bool bCheck = true, bool bBeforCheckStock = true, bool bList = false)
|
||||
public async Task<BaseResult<string>> UnVerify(string cAccId, string cCardNum, string cCode, bool bCheck = true, bool bBeforCheckStock = true, bool bList = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1095,7 +1100,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
|
||||
var voucherIds = input.voucherId;
|
||||
|
||||
if ((cCodes == null || cCodes.Count<=0) && (voucherIds == null || voucherIds.Count <= 0))
|
||||
if ((cCodes == null || cCodes.Count <= 0) && (voucherIds == null || voucherIds.Count <= 0))
|
||||
{
|
||||
throw new Exception("没有数据需要弃审");
|
||||
}
|
||||
@@ -1183,7 +1188,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
/// <exception cref="Exception"></exception>
|
||||
[HttpGet]
|
||||
[Route("api/U8/ST/{cCardNum}/Delete/Code")]
|
||||
public async Task<BaseResult<string>> Delete(string cAccId, string cCardNum,string cCode, bool bCheck = true, bool bBeforCheckStock = true, bool bList = false)
|
||||
public async Task<BaseResult<string>> Delete(string cAccId, string cCardNum, string cCode, bool bCheck = true, bool bBeforCheckStock = true, bool bList = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1330,7 +1335,7 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
|
||||
var voucherIds = input.voucherId;
|
||||
|
||||
if ((cCodes == null || cCodes.Count<=0) && (voucherIds == null || voucherIds.Count <= 0))
|
||||
if ((cCodes == null || cCodes.Count <= 0) && (voucherIds == null || voucherIds.Count <= 0))
|
||||
{
|
||||
throw new Exception("没有数据需要删除");
|
||||
}
|
||||
|
||||
@@ -302,6 +302,7 @@
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Text.Encodings.Web, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.9.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
Reference in New Issue
Block a user