1.新增销售模块自动审核功能
This commit is contained in:
Binary file not shown.
@@ -1002,12 +1002,17 @@
|
||||
<returns></returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="T:UFIDA.U8.Framework.Api.Controllers.U8.SAController">
|
||||
<summary>
|
||||
销售管理
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:UFIDA.U8.Framework.Api.Controllers.U8.SAController._logInfo">
|
||||
<summary>
|
||||
日志组件
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:UFIDA.U8.Framework.Api.Controllers.U8.SAController.Save(System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},System.Int32)">
|
||||
<member name="M:UFIDA.U8.Framework.Api.Controllers.U8.SAController.Save(System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},System.Int32,System.Nullable{System.Boolean})">
|
||||
<summary>
|
||||
保存单据
|
||||
</summary>
|
||||
@@ -1015,6 +1020,7 @@
|
||||
<param name="cCardNum">单据类型编码</param>
|
||||
<param name="input">报文</param>
|
||||
<param name="VoucherState">单据状态:0新增,1修改</param>
|
||||
<param name="bVerify">是否审核</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
"cexch_name": "人民币", //币种
|
||||
"cmaker": "demo", //制单人
|
||||
"breturnflag": 0, //退货标志
|
||||
"cstcode": "", //销售类型编码
|
||||
"cdepcode": "", //部门编码
|
||||
"ccuscode": "", //客户编码
|
||||
"cstcode": "01", //销售类型编码
|
||||
"cdepcode": "0301", //部门编码
|
||||
"ccuscode": "00000001", //客户编码
|
||||
"dpredatebt": "2025-01-01", //预发货日期
|
||||
"dpremodatebt": "2025-01-01", //预完工日期
|
||||
"iexchrate": 1, //汇率
|
||||
@@ -16,12 +16,15 @@
|
||||
"cpersoncode": "", //业务员编码
|
||||
"body": [
|
||||
{
|
||||
"cinvcode": "", //存货编码
|
||||
"cinvcode": "W1000A002", //存货编码
|
||||
"iquantity": 10, //数量
|
||||
"dpredate": "2025-01-01", //预发货日期
|
||||
"dpremodate": "2025-01-01", //预完工日期
|
||||
"editprop": "A", //编辑属性
|
||||
"irowno": 1, //行号
|
||||
"cinvm_unit": "台",
|
||||
"igrouptype": 0,
|
||||
"cgroupcode": "01",
|
||||
"itaxunitprice": 1, //含税单价
|
||||
"iquotedprice": 1, //报价
|
||||
"iunitprice": 1, //无税单价
|
||||
|
||||
@@ -205,7 +205,7 @@ namespace UFIDA.U8.Framework.Api
|
||||
//
|
||||
//c.InjectJavaScript(thisAssembly, "Swashbuckle.Dummy.SwaggerExtensions.testScript1.js");
|
||||
c.InjectJavaScript(Assembly.GetExecutingAssembly(), "UFIDA.U8.Framework.Api.Scripts.Swagger_zh-cn.js");
|
||||
|
||||
c.DisableValidator();
|
||||
// The swagger-ui renders boolean data types as a dropdown. By default, it provides "true" and "false"
|
||||
// strings as the possible choices. You can use this option to change these to something else,
|
||||
// for example 0 and 1.
|
||||
|
||||
@@ -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