ZR20090193-陈敬勇 6 months ago
commit 87dfb164b8

@ -15,4 +15,14 @@ public class IdModel
/// </summary>
public long[] Ids { get; set; }
/// <summary>
/// 业务类型1、海运出口 2、海运进口
/// </summary>
public int BusinessType { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}

@ -0,0 +1,156 @@
using DS.Module.Core;
namespace DS.WMS.Core.Fee.Dtos
{
/// <summary>
/// 费用核算单
/// </summary>
public class CostAccountingForm
{
//public long BusinessId { get; set; }
//public BusinessType BusinessType { get; set; }
/// <summary>
/// 业务编号
/// </summary>
public string BusinessNo { get; set; }
/// <summary>
/// 会计期间
/// </summary>
public string AccountingPeriod { get; set; }
/// <summary>
/// 预计抵港时间
/// </summary>
public DateTime? ETA { get; set; }
/// <summary>
/// 预计出发时间
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 船号
/// </summary>
public string Voy { get; set; }
/// <summary>
/// 船东提单
/// </summary>
public string MBLNo { get; set; }
/// <summary>
/// 承运人
/// </summary>
public string Carrier { get; set; }
/// <summary>
/// 装运港
/// </summary>
public string POL { get; set; }
/// <summary>
/// 目的港
/// </summary>
public string POD { get; set; }
public string Volume { get; set; }
/// <summary>
/// 放单方式
/// </summary>
public string ReleaseType { get; set; }
/// <summary>
/// 打印人
/// </summary>
public string Creator { get; set; }
/// <summary>
/// 打印时间
/// </summary>
public DateTime PrintTime { get; set; }
/// <summary>
/// 人民币应收合计
/// </summary>
public decimal ReceivableRMB { get; set; }
/// <summary>
/// 人民币应付合计
/// </summary>
public decimal PayableRMB { get; set; }
/// <summary>
/// 美元应收合计
/// </summary>
public decimal ReceivableUSD { get; set; }
/// <summary>
/// 美元应付合计
/// </summary>
public decimal PayableUSD { get; set; }
/// <summary>
/// 其他应收合计
/// </summary>
public decimal ReceivableOther { get; set; }
/// <summary>
/// 其他应付合计
/// </summary>
public decimal PayableOther { get; set; }
/// <summary>
/// 人民币应收总计
/// </summary>
public decimal TotalReceivable { get; set; }
/// <summary>
/// 人民币应付总计
/// </summary>
public decimal TotalPayable { get; set; }
/// <summary>
/// 利润
/// </summary>
public decimal ProfitMargin => TotalReceivable - TotalPayable;
/// <summary>
/// 汇率
/// </summary>
public decimal ExchangeRate { get; set; }
public List<CostAccountingDetail> Details { get; set; }
}
public class CostAccountingDetail
{
public string FeeName { get; set; }
public FeeType Type { get; set; }
public string Currency { get; set; }
//public decimal? USDAmount { get; set; }
//public decimal? RMBAmount { get; set; }
public decimal Amount { get; set; }
public string CustomerName { get; set; }
//public decimal ExchangeRate { get; set; }
public string StatusText { get; set; }
}
}

@ -180,10 +180,10 @@ namespace DS.WMS.Core.Fee.Entity
public DateTime? AuditDate { get; set; }
/// <summary>
/// 是否机密费用
/// 是否公开费用
/// </summary>
[SugarColumn(ColumnDescription = "是否机密费用", DefaultValue = "0")]
public bool? IsOpen { get; set; } = false;
[SugarColumn(ColumnDescription = "是否公开费用", DefaultValue = "1")]
public bool IsOpen { get; set; } = true;
/// <summary>
/// 对帐编号
/// </summary>

@ -49,9 +49,10 @@ public interface IFeeRecordService
/// 发起审批工作流
/// </summary>
/// <param name="auditType">审批类型</param>
/// <param name="remark">备注</param>
/// <param name="idArray">费用记录ID</param>
/// <returns></returns>
DataResult SubmitForApproval(FeeAuditType auditType, params long[] idArray);
DataResult SubmitForApproval(FeeAuditType auditType, string remark, params long[] idArray);
/// <summary>
/// 发起费用修改申请
@ -74,5 +75,19 @@ public interface IFeeRecordService
/// <returns></returns>
DataResult UpdateAuditStatus(FlowCallback callback);
/// <summary>
/// 获取费用核算单打印信息
/// </summary>
/// <param name="businessType">业务类型</param>
/// <param name="idArray">费用记录ID</param>
/// <returns></returns>
DataResult<CostAccountingForm> GetPrintInfo(BusinessType businessType, params long[] idArray);
/// <summary>
/// 设置发票启用状态
/// </summary>
/// <param name="enabled">是否启用</param>
/// <param name="idArray">费用记录ID</param>
/// <returns></returns>
DataResult SetInvoiceEnabled(bool enabled, params long[] idArray);
}

@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Text;
using System.Text;
using AngleSharp.Dom;
using DS.Module.Core;
using DS.Module.Core.Extensions;
@ -14,6 +13,7 @@ using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
using LanguageExt;
using LanguageExt.Pipes;
using Mapster;
using Masuit.Tools.Systems;
using Microsoft.Extensions.DependencyInjection;
@ -27,7 +27,7 @@ namespace DS.WMS.Core.Fee.Method
public class FeeRecordService : IFeeRecordService
{
const long PERMISSION_ID = 1793490768447541248;
readonly string DefaultCurrency = "CNY";
readonly string DefaultCurrency = "CNY";//默认本币
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
@ -53,10 +53,11 @@ namespace DS.WMS.Core.Fee.Method
public DataResult<List<FeeRecordRes>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
long userId = long.Parse(user.UserId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<FeeRecord>()
.Where(x => x.IsOpen || (!x.IsOpen && x.CreateBy == userId))
.Where(whereList)
.Select<FeeRecordRes>()
.ToQueryPage(request.PageCondition);
@ -92,7 +93,8 @@ namespace DS.WMS.Core.Fee.Method
public DataResult<List<FeeRecord>> GetList(string query)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var src = tenantDb.Queryable<FeeRecord>();
long userId = long.Parse(user.UserId);
var src = tenantDb.Queryable<FeeRecord>().Where(x => x.IsOpen || (!x.IsOpen && x.CreateBy == userId));
if (!query.IsNullOrEmpty())
{
//序列化查询条件
@ -221,35 +223,6 @@ namespace DS.WMS.Core.Fee.Method
}
}
//获取汇率
void FetchExchangeRate(SqlSugarScopeProvider tenantDb, IEnumerable<FeeRecord> records)
{
var exRecords = records.Where(x => !x.ExchangeRate.HasValue && x.Currency != DefaultCurrency).ToList();
if (exRecords.Count > 0)
{
var codes = exRecords.Select(x => x.Currency).Distinct().ToList();
var currencies = tenantDb.Queryable<FeeCurrency>().Where(x => codes.Contains(x.CodeName)).Includes(x => x.Exchanges).ToList();
DateTime dtNow = DateTime.Now;
foreach (var item in exRecords)
{
var currency = currencies.Find(x => x.CodeName == item.Currency);
if (currency != null)
{
item.ExchangeRate = currency.DefaultRate;
if (currency.Exchanges != null)
{
//取当前时间范围内的最新一条
var exchange = currency.Exchanges.FindAll(x => x.Status == StatusEnum.Enable &&
x.StartDate >= dtNow && x.EndDate <= dtNow).OrderByDescending(x => x.UpdateTime).FirstOrDefault();
if (exchange != null)
item.ExchangeRate = item.FeeType == FeeType.Receivable ? exchange.DRValue : exchange.CRValue;
}
}
}
}
}
/// <summary>
/// 根据模板ID创建
/// </summary>
@ -338,9 +311,10 @@ namespace DS.WMS.Core.Fee.Method
/// 发起审批/申请删除工作流
/// </summary>
/// <param name="auditType">审批类型</param>
/// <param name="remark">备注</param>
/// <param name="idArray">费用记录ID</param>
/// <returns></returns>
public DataResult SubmitForApproval(FeeAuditType auditType, params long[] idArray)
public DataResult SubmitForApproval(FeeAuditType auditType, string remark, params long[] idArray)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var fees = tenantDb.Queryable<FeeRecord>().Where(x => idArray.Contains(x.Id)).Select(
@ -377,7 +351,7 @@ namespace DS.WMS.Core.Fee.Method
}
else if (auditType == FeeAuditType.ApplyDeletion)
{
result = ApplyDelete(tenantDb, fees);
result = ApplyDelete(tenantDb, fees, remark);
}
if (!result.Succeeded)
@ -450,7 +424,7 @@ namespace DS.WMS.Core.Fee.Method
}
//审核通过->申请删除
DataResult ApplyDelete(SqlSugarScopeProvider tenantDb, List<FeeRecord> fees)
DataResult ApplyDelete(SqlSugarScopeProvider tenantDb, List<FeeRecord> fees, string reason)
{
StringBuilder sb = new StringBuilder();
foreach (var fe in fees)
@ -487,6 +461,7 @@ namespace DS.WMS.Core.Fee.Method
item.SubmitBy = long.Parse(user.UserId);
item.SubmitDate = dtNow;
item.FlowId = instance.Id;
item.Note = reason;
}
}
@ -545,8 +520,8 @@ namespace DS.WMS.Core.Fee.Method
//变更状态为申请修改
fee.FeeStatus = FeeStatus.ApplyModification;
fee.SubmitBy = long.Parse(user.UserId);
fee.SubmitDate = dtNow;
//fee.SubmitBy = long.Parse(user.UserId);
//fee.SubmitDate = dtNow;
fee.FlowId = instance.Id;
}
}
@ -618,7 +593,6 @@ namespace DS.WMS.Core.Fee.Method
tenantDb.Updateable(fee).UpdateColumns(x => new
{
x.Id,
x.FeeStatus,
x.AuditBy,
x.AuditDate,
@ -649,7 +623,6 @@ namespace DS.WMS.Core.Fee.Method
fm.DeleteBy = long.Parse(user.UserId);
tenantDb.Updateable(fm).UpdateColumns(x => new
{
x.Id,
x.DeleteBy,
x.Deleted,
x.DeleteTime
@ -660,7 +633,6 @@ namespace DS.WMS.Core.Fee.Method
fee.FeeStatus = FeeStatus.RejectApplication;
tenantDb.Updateable(fee).UpdateColumns(x => new
{
x.Id,
x.FeeStatus,
x.Reason,
x.FlowId
@ -671,7 +643,20 @@ namespace DS.WMS.Core.Fee.Method
case FeeAuditType.ApplyDeletion:
if (callback.FlowStatus == FlowStatusEnum.Approve)
{
tenantDb.Deleteable(fee).ExecuteCommand();
fee.Deleted = true;
fee.DeleteBy = long.Parse(user.UserId);
fee.DeleteTime = DateTime.Now;
tenantDb.Updateable(fee).UpdateColumns(x => new
{
x.DeleteBy,
x.Deleted,
x.DeleteTime,
x.Reason,
x.FlowId
}).ExecuteCommand();
//tenantDb.Deleteable(fee).ExecuteCommand();
}
else
{
@ -679,7 +664,6 @@ namespace DS.WMS.Core.Fee.Method
tenantDb.Updateable(fee).UpdateColumns(x => new
{
x.Id,
x.FeeStatus,
x.Reason,
x.FlowId
@ -814,10 +798,10 @@ namespace DS.WMS.Core.Fee.Method
/// <summary>
/// 整单审核
/// </summary>
/// <param name="type">业务类型</param>
/// <param name="bid">业务ID</param>
/// <param name="type">业务类型</param>
/// <returns></returns>
public DataResult AuditBusiness(BusinessType type, long bid)
public DataResult AuditBusiness(long bid, BusinessType type)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var entity = tenantDb.Queryable<BusinessFeeStatus>().Where(x => x.BusinessId == bid &&
@ -872,6 +856,129 @@ namespace DS.WMS.Core.Fee.Method
return DataResult.Failed("创建工作流失败", MultiLanguageConst.Operation_Failed);
}
/// <summary>
/// 设置发票启用状态
/// </summary>
/// <param name="enabled">是否启用</param>
/// <param name="idArray">费用记录ID</param>
/// <returns></returns>
public DataResult SetInvoiceEnabled(bool enabled, params long[] idArray)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var list = idArray.Select(x => new FeeRecord { Id = x, IsInvoice = enabled }).ToList();
int rows = tenantDb.Updateable(list).UpdateColumns(x => new { x.IsInvoice }).ExecuteCommand();
return rows > 0 ? DataResult.Successed("设置成功!", MultiLanguageConst.DataUpdateSuccess) : DataResult.Failed("设置失败!", MultiLanguageConst.Operation_Failed);
}
/// <summary>
/// 获取费用核算单打印信息
/// </summary>
/// <param name="businessType">业务类型</param>
/// <param name="idArray">费用记录ID</param>
/// <returns></returns>
public DataResult<CostAccountingForm> GetPrintInfo(BusinessType businessType, params long[] idArray)
{
CostAccountingForm form = null;
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
switch (businessType)
{
//case BusinessType.ChangeOrder:
// break;
case BusinessType.OceanShippingExport:
form = GetOceanShippingExportForm(tenantDb, idArray);
break;
case BusinessType.OceanShippingImport:
break;
default:
return DataResult<CostAccountingForm>.Failed(
$"不支持业务类型为【{businessType.GetDescription()}】的费用打印", MultiLanguageConst.Operation_Failed);
}
if (form != null)
{
long userId = long.Parse(user.UserId);
form.Creator = db.Queryable<SysUser>().Where(x => x.Id == userId).Select(x => x.NickName).First();
form.ReceivableRMB = form.Details.FindAll(x => x.Type == FeeType.Receivable && x.Currency == "CNY").Sum(x => x.Amount);
form.PayableRMB = form.Details.FindAll(x => x.Type == FeeType.Payable && x.Currency == "CNY").Sum(x => x.Amount);
form.ReceivableUSD = form.Details.FindAll(x => x.Type == FeeType.Receivable && x.Currency == "USD").Sum(x => x.Amount);
form.PayableUSD = form.Details.FindAll(x => x.Type == FeeType.Payable && x.Currency == "USD").Sum(x => x.Amount);
form.ReceivableOther = form.Details.FindAll(x => x.Type == FeeType.Receivable && (x.Currency != "CNY" && x.Currency != "USD")).Sum(x => x.Amount);
form.PayableOther = form.Details.FindAll(x => x.Type == FeeType.Payable && (x.Currency == "CNY" && x.Currency != "USD")).Sum(x => x.Amount);
//获取美元汇率
var fees = new List<FeeRecord> {
new FeeRecord { Currency = "USD", FeeType = FeeType.Receivable },
new FeeRecord { Currency = "USD", FeeType = FeeType.Payable }
};
FetchExchangeRate(tenantDb, fees);
form.ExchangeRate = fees[0].ExchangeRate.HasValue ? fees[0].ExchangeRate.Value : 1;
form.TotalReceivable = Math.Round(form.ReceivableUSD * form.ExchangeRate, 4, MidpointRounding.ToEven) + form.ReceivableRMB + form.ReceivableOther;
form.TotalPayable = Math.Round(form.PayableUSD * form.ExchangeRate, 4, MidpointRounding.ToEven) + form.PayableRMB + form.PayableOther;
}
return DataResult<CostAccountingForm>.Success(form);
}
CostAccountingForm GetOceanShippingExportForm(SqlSugarScopeProvider tenantDb, params long[] idArray)
{
CostAccountingForm form = null;
var list = tenantDb.Queryable<FeeRecord>().InnerJoin<SeaExport>((x, y) => x.BusinessId == y.Id)
.Where((x, y) => idArray.Contains(x.Id)
//&& x.FeeStatus == FeeStatus.SettlementCompleted
).Select((x, y) => new
{
x.FeeType,
x.FeeName,
x.Currency,
x.ExchangeRate,
x.Amount,
x.CustomerName,
y.CustomerNo, //业务编号
y.AccountDate, //会计期间
y.ETA,
y.ETD,
y.Voyno,
y.MBLNO,
y.Carrier,
y.LoadPort,
y.DischargePort,
y.CntrTotal, //Volume
y.IssueType //放单方式
}).ToList();
if (list.Count == 0)
return form;
var item = list[0];
form = new CostAccountingForm
{
BusinessNo = item.CustomerNo,
AccountingPeriod = item.AccountDate,
ETA = item.ETA,
ETD = item.ETD,
Voy = item.Voyno,
MBLNo = item.MBLNO,
Carrier = item.Carrier,
POL = item.LoadPort,
POD = item.DischargePort,
Volume = item.CntrTotal,
ReleaseType = item.IssueType,
PrintTime = DateTime.Now,
Details = list.Select(x => new CostAccountingDetail
{
Amount = x.Amount.GetValueOrDefault(),
Currency = x.Currency,
CustomerName = x.CustomerName,
FeeName = x.FeeName,
Type = x.FeeType
}).ToList()
};
return form;
}
//回写业务主表的费用状态
void WriteBackStatus(SqlSugarScopeProvider tenantDb, long businessId, BusinessType businessType)
@ -884,6 +991,11 @@ namespace DS.WMS.Core.Fee.Method
FeeType = x.FeeType,
FeeStatus = x.FeeStatus
}).ToList();
if (fees.IsNullOrEmpty())
{
return;
}
var arFeeStatus = DetermineStatus(fees.FindAll(x => x.FeeType == FeeType.Receivable));
var apFeeStatus = DetermineStatus(fees.FindAll(x => x.FeeType == FeeType.Payable));
@ -965,5 +1077,34 @@ namespace DS.WMS.Core.Fee.Method
x.AuditType == auditType).First();
}
//获取汇率
void FetchExchangeRate(SqlSugarScopeProvider tenantDb, IEnumerable<FeeRecord> items)
{
var exRecords = items.Where(x => !x.ExchangeRate.HasValue && x.Currency != DefaultCurrency).ToList();
if (exRecords.Count > 0)
{
var codes = exRecords.Select(x => x.Currency).Distinct().ToList();
var currencies = tenantDb.Queryable<FeeCurrency>().Where(x => codes.Contains(x.CodeName)).Includes(x => x.Exchanges).ToList();
DateTime dtNow = DateTime.Now;
foreach (var item in exRecords)
{
var currency = currencies.Find(x => x.CodeName == item.Currency);
if (currency != null)
{
item.ExchangeRate = currency.DefaultRate;
if (!currency.Exchanges.IsNullOrEmpty())
{
//取当前时间范围内的最新一条
var exchange = currency.Exchanges.FindAll(x => x.Status == StatusEnum.Enable &&
x.StartDate >= dtNow && x.EndDate <= dtNow).OrderByDescending(x => x.UpdateTime).FirstOrDefault();
if (exchange != null)
item.ExchangeRate = item.FeeType == FeeType.Receivable ? exchange.DRValue : exchange.CRValue;
}
}
}
}
}
}
}

@ -6,6 +6,7 @@ using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Op.Entity;
using Mapster;
using Microsoft.AspNetCore.Mvc;
@ -126,7 +127,7 @@ namespace DS.WMS.FeeApi.Controllers
if (model == null || model.Ids.Length == 0)
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
return _feeService.SubmitForApproval(FeeAuditType.ApplyAudit, model.Ids);
return _feeService.SubmitForApproval(FeeAuditType.ApplyAudit, model.Remark, model.Ids);
}
/// <summary>
@ -140,7 +141,7 @@ namespace DS.WMS.FeeApi.Controllers
if (model == null || model.Ids.Length == 0)
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
return _feeService.SubmitForApproval(FeeAuditType.ApplyDeletion, model.Ids);
return _feeService.SubmitForApproval(FeeAuditType.ApplyDeletion, model.Remark, model.Ids);
}
/// <summary>
@ -184,5 +185,19 @@ namespace DS.WMS.FeeApi.Controllers
return _feeService.UpdateAuditStatus(callback);
}
/// <summary>
/// 获取费用核算单打印信息
/// </summary>
/// <param name="model">费用记录ID</param>
/// <returns></returns>
[HttpGet, Route("GetPrintInfo")]
public DataResult<CostAccountingForm> GetPrintInfo(IdModel model)
{
if (model == null || model.Ids.Length == 0)
return DataResult<CostAccountingForm>.Failed("参数无效", MultiLanguageConst.IllegalRequest);
return _feeService.GetPrintInfo((BusinessType)model.BusinessType, model.Ids);
}
}
}

@ -817,3 +817,24 @@
2024-05-30 16:14:34.5552 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-05-30 16:14:34.5552 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-30 16:14:34.5552 Info Configuration initialized.
2024-05-30 17:18:51.4939 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-30 17:18:51.5108 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-30 17:18:51.5108 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-30 17:18:51.5360 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-30 17:18:51.5446 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-05-30 17:18:51.5446 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-30 17:18:51.5523 Info Configuration initialized.
2024-05-31 13:44:57.6773 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-31 13:44:57.6773 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-31 13:44:57.6926 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-31 13:44:57.6926 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-31 13:44:57.7102 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-05-31 13:44:57.7102 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-31 13:44:57.7102 Info Configuration initialized.
2024-05-31 13:51:07.1307 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-31 13:51:07.1307 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-31 13:51:07.1466 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-31 13:51:07.1466 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-31 13:51:07.1658 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-05-31 13:51:07.1658 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-31 13:51:07.1658 Info Configuration initialized.

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-05-30T08:18:06.9957657Z||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;True|2024-05-21T11:04:27.3649637+08:00||;</History>
<History>True|2024-05-31T05:56:03.0734064Z||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;True|2024-05-21T11:04:27.3649637+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

@ -122,11 +122,10 @@ public class ClientFlowInstanceController : ApiController
/// <param name="type">流程类型</param>
/// <returns></returns>
[HttpGet, Route("GetFlowContent")]
public IActionResult GetFlowContent([FromQuery] long businessId, [FromQuery] BusinessType businessType, [FromQuery] FeeAuditType type)
public DataResult<string> GetFlowContent([FromQuery] long businessId, [FromQuery] BusinessType businessType, [FromQuery] FeeAuditType type)
{
var res = _invokeService.GetFlowInstance(businessId, businessType, type.ToString());
string? content = res.Data?.Content;
string json = JsonConvert.SerializeObject(DataResult<string>.Success(content ?? string.Empty));
return new ContentResult { Content = json, ContentType = "application/json" };
return DataResult<string>.Success(content ?? string.Empty);
}
}

@ -1653,3 +1653,10 @@
2024-05-30 16:14:35.4162 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config
2024-05-30 16:14:35.4162 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-30 16:14:35.4302 Info Configuration initialized.
2024-05-30 17:18:51.4932 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-30 17:18:51.5110 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-30 17:18:51.5110 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-30 17:18:51.5305 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-30 17:18:51.5383 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config
2024-05-30 17:18:51.5383 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-30 17:18:51.5383 Info Configuration initialized.

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\Main</_PublishTargetUrl>
<History>True|2024-05-30T08:18:14.8047074Z||;True|2024-05-30T09:30:24.9756841+08:00||;True|2024-05-29T17:46:22.9869679+08:00||;True|2024-05-29T17:20:28.9621862+08:00||;True|2024-05-29T17:18:16.4688274+08:00||;True|2024-05-29T16:33:42.5152962+08:00||;False|2024-05-29T16:33:09.8393409+08:00||;False|2024-05-29T16:31:07.7569208+08:00||;True|2024-05-28T18:00:39.2399003+08:00||;True|2024-05-28T08:47:53.8630073+08:00||;True|2024-05-23T17:51:45.6784172+08:00||;True|2024-05-21T17:32:52.9294009+08:00||;</History>
<History>True|2024-05-31T05:57:26.8256021Z||;True|2024-05-30T16:18:14.8047074+08:00||;True|2024-05-30T09:30:24.9756841+08:00||;True|2024-05-29T17:46:22.9869679+08:00||;True|2024-05-29T17:20:28.9621862+08:00||;True|2024-05-29T17:18:16.4688274+08:00||;True|2024-05-29T16:33:42.5152962+08:00||;False|2024-05-29T16:33:09.8393409+08:00||;False|2024-05-29T16:31:07.7569208+08:00||;True|2024-05-28T18:00:39.2399003+08:00||;True|2024-05-28T08:47:53.8630073+08:00||;True|2024-05-23T17:51:45.6784172+08:00||;True|2024-05-21T17:32:52.9294009+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
Loading…
Cancel
Save