1.新增销售模块自动审核功能
This commit is contained in:
@@ -9,6 +9,8 @@ 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;
|
||||
using UFIDA.U8.Framework.Api.ControlObject.Json;
|
||||
@@ -16,6 +18,7 @@ using UFIDA.U8.Framework.Api.ControlObject.U8M;
|
||||
using UFIDA.U8.Framework.Api.Entity;
|
||||
using UFIDA.U8.Framework.Api.Models;
|
||||
using UFIDA.U8.Framework.Api.Unit;
|
||||
using SysU8AccountConfig = UFIDA.U8.Framework.Api.ControlObject.Entity.SysU8AccountConfig;
|
||||
|
||||
namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
{
|
||||
@@ -454,5 +457,41 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/U8/DP/InitSubSystem")]
|
||||
public async Task<BaseResult<long>> InitSubSystem(Dictionary<string,string> input)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!input.TryGetValue("cAppInfo", out var cValue) || string.IsNullOrWhiteSpace(cValue))
|
||||
{
|
||||
throw new Exception("参数错误");
|
||||
}
|
||||
var info = CommUnit.GetDecrypt(cValue).ToObject<SysSubSystem>();
|
||||
|
||||
var db = CommUnit.GetDbClient();
|
||||
if (await db.Queryable<SysSubSystem>().AnyAsync(a => a.AppKey == info.AppKey))
|
||||
{
|
||||
throw new Exception("当前子系统已注册");
|
||||
}
|
||||
|
||||
info.Id=SnowFlakeSingle.instance.NextId();
|
||||
|
||||
await db.Insertable(info).ExecuteCommandAsync();
|
||||
|
||||
return new BaseResult<long>() { bSuccess = true, message = "注册成功", result = info.Id };
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logInfo.Error(ex.Message, ex);
|
||||
|
||||
await Task.Delay(1);
|
||||
|
||||
return new BaseResult<long>() { bSuccess = false, message = "子系统初始化失败", result = 0 };
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,11 +208,21 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
});
|
||||
}
|
||||
|
||||
if (colListBody.Any(a => string.Equals(a.Key, "RelsTime", StringComparison.OrdinalIgnoreCase) || string.Equals(a.Value, "RelsTime", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
var col = colListBody.First(a => string.Equals(a.Key, "RelsTime", StringComparison.OrdinalIgnoreCase) || string.Equals(a.Value, "RelsTime", StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
conModels.Add(new ConditionalModel
|
||||
{
|
||||
FieldName = $"{col.Value}",
|
||||
ConditionalType = ConditionalType.GreaterThanOrEqual,
|
||||
FieldValue = $"{o.Value}"
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (o.Key == "dModifyDate__2")
|
||||
{
|
||||
if (colListHead.Any(a => string.Equals(a.Key, "dnveriRelsTimefytime", StringComparison.OrdinalIgnoreCase) || string.Equals(a.Value, "RelsTime", StringComparison.OrdinalIgnoreCase)))
|
||||
if (colListHead.Any(a => string.Equals(a.Key, "RelsTime", StringComparison.OrdinalIgnoreCase) || string.Equals(a.Value, "RelsTime", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
var col = colListHead.First(a => string.Equals(a.Key, "RelsTime", StringComparison.OrdinalIgnoreCase) || string.Equals(a.Value, "RelsTime", StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
@@ -223,6 +233,18 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
FieldValue = $"{o.Value}"
|
||||
});
|
||||
}
|
||||
|
||||
if (colListBody.Any(a => string.Equals(a.Key, "dnveriRelsTimefytime", StringComparison.OrdinalIgnoreCase) || string.Equals(a.Value, "RelsTime", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
var col = colListBody.First(a => string.Equals(a.Key, "RelsTime", StringComparison.OrdinalIgnoreCase) || string.Equals(a.Value, "RelsTime", StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
conModels.Add(new ConditionalModel
|
||||
{
|
||||
FieldName = $"{col.Value}",
|
||||
ConditionalType = ConditionalType.LessThanOrEqual,
|
||||
FieldValue = $"{o.Value}"
|
||||
});
|
||||
}
|
||||
}
|
||||
else if ($"{o.Value}".EndsWith("%") || $"{o.Value}".StartsWith("%"))
|
||||
{
|
||||
|
||||
@@ -20,6 +20,9 @@ using UFIDA.U8.Framework.Api.Unit;
|
||||
|
||||
namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
{
|
||||
/// <summary>
|
||||
/// 销售管理
|
||||
/// </summary>
|
||||
public class SAController : ApiController
|
||||
{
|
||||
|
||||
@@ -37,11 +40,12 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
/// <param name="cCardNum">单据类型编码</param>
|
||||
/// <param name="input">报文</param>
|
||||
/// <param name="VoucherState">单据状态:0新增,1修改</param>
|
||||
/// <param name="bVerify">是否审核</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
[HttpPost]
|
||||
[Route("api/U8/SA/{cCardNum}/Save")]
|
||||
public async Task<BaseResult<string>> Save(string cAccId, string cCardNum, [FromBody] Dictionary<string, object> input, int VoucherState = 0)
|
||||
public async Task<BaseResult<string>> Save(string cAccId, string cCardNum, [FromBody] Dictionary<string, object> input, int VoucherState = 0, bool? bVerify = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -135,7 +139,9 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
|
||||
|
||||
var co = new ClsVoucherCO_SA();
|
||||
|
||||
var res = await co.Save(baseLogin, input, cCardNum, (VoucherTypeSA)Convert.ToInt32(voucherInfo.VoucherType), VoucherState,bGetCode, codeKey, voucherInfo.bVerify, voucherInfo.iswfcontrolled, voucherInfo.cFlowFieldName);
|
||||
var res = await co.Save(baseLogin, input, cCardNum,
|
||||
(VoucherTypeSA)Convert.ToInt32(voucherInfo.VoucherType), VoucherState, bGetCode, codeKey,
|
||||
bVerify ?? voucherInfo.bVerify, voucherInfo.iswfcontrolled, voucherInfo.cFlowFieldName);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user