完善根据模板ID创建方法

usertest
嵇文龙 6 months ago
parent 367052fe0d
commit ddd296154f

@ -0,0 +1,49 @@
using System.ComponentModel;
namespace DS.Module.Core
{
/// <summary>
/// 客户类型
/// </summary>
public enum CustomerTypeEnum
{
[Description("WTDW-委托单位")]
WTDW,
[Description("CGS-船公司")]
CGS,
[Description("DCDL-订舱代理")]
DCDL,
[Description("BGH-报关行")]
BGH,
[Description("CD-车队")]
CD,
[Description("FHR-发货人")]
FHR,
[Description("SHR-收货人")]
SHR,
[Description("DL-代理")]
DL,
[Description("TZR-通知人")]
TZR,
[Description("CDD-船代")]
CDD,
[Description("BXGS-保险公司")]
BXGS,
[Description("CK-仓库")]
CK,
[Description("QT-其他")]
QT
}
}

@ -44,6 +44,18 @@ public class FeeCodeReq
/// </summary>
public string DefaultCredit { get; set; }
/// <summary>
/// 默认计费标准名称
/// </summary>
public string DefaultUnitName { get; set; }
/// <summary>
/// 默认付费客户类型名称
/// </summary>
public string DefaultDebitName { get; set; }
/// <summary>
///默认付费客户类型名称
/// </summary>
public string DefaultCreditName { get; set; }
/// <summary>
/// 海运 海运相关模块使用
/// </summary>
public bool? IsSea { get; set; } = false;

@ -44,6 +44,18 @@ public class FeeCodeRes
/// </summary>
public string DefaultCredit { get; set; }
/// <summary>
/// 默认计费标准名称
/// </summary>
public string DefaultUnitName { get; set; }
/// <summary>
/// 默认付费客户类型名称
/// </summary>
public string DefaultDebitName { get; set; }
/// <summary>
///默认付费客户类型名称
/// </summary>
public string DefaultCreditName { get; set; }
/// <summary>
/// 海运 海运相关模块使用
/// </summary>
public bool? IsSea { get; set; } = false;

@ -32,7 +32,7 @@ public class FeeCustTemplateDetailReq
/// <summary>
/// 结算对象类型
/// </summary>
public string CustomerType { get; set; }
public CustomerTypeEnum? CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -1,4 +1,5 @@
using DS.Module.Core;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
@ -32,7 +33,8 @@ public class FeeCustTemplateDetailRes
/// <summary>
/// 结算对象类型
/// </summary>
public string CustomerType { get; set; }
public CustomerTypeEnum? CustomerType { get; set; }
public string CustomerTypeText { get { return CustomerType.HasValue ? CustomerType.Value.GetDescription() : string.Empty; } }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -54,7 +54,7 @@ public class FeeRecordReq
/// <summary>
/// 费用对象类型
/// </summary>
public string CustomerType { get; set; }
public CustomerTypeEnum? CustomerType { get; set; }
/// <summary>
/// 费用标准
@ -167,7 +167,7 @@ public class FeeRecordReq
/// <summary>
/// 费用状态
/// </summary>
public int FeeStatus { get; set; }
public FeeStatusEnum FeeStatus { get; set; }
/// <summary>
/// 发票号

@ -1,4 +1,5 @@
using DS.Module.Core;
using Masuit.Tools.Systems;
using SqlSugar;
using System.ComponentModel;
@ -18,11 +19,14 @@ public class FeeRecordRes
/// 业务Id
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 收付类型(收、付) 1应收 2 应付
/// </summary>
public int FeeType { get; set; }
public string FeeTypeText { get { return FeeType == 1 ? "应收" : "应付"; } }
/// <summary>
/// 费用Id
/// </summary>
@ -54,7 +58,9 @@ public class FeeRecordRes
/// <summary>
/// 费用对象类型
/// </summary>
public string CustomerType { get; set; }
public CustomerTypeEnum? CustomerType { get; set; }
public string CustomerTypeText { get { return CustomerType.HasValue ? CustomerType.Value.GetDescription() : string.Empty; } }
/// <summary>
/// 费用标准
@ -167,7 +173,9 @@ public class FeeRecordRes
/// <summary>
/// 费用状态
/// </summary>
public int FeeStatus { get; set; }
public FeeStatusEnum FeeStatus { get; set; }
public string FeeStatusText { get { return FeeStatus.GetDescription(); } }
/// <summary>
/// 发票号

@ -0,0 +1,28 @@
namespace DS.WMS.Core.Fee.Dtos
{
public class FeeRecordSubmit
{
/// <summary>
/// 当前业务ID
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 要提交的费用项
/// </summary>
public List<FeeRecordReq> Items { get; set; }
}
public class FeeRecordByTemplate
{
/// <summary>
/// 当前业务ID
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 要引入费用模板的ID
/// </summary>
public long[] TemplateIdList { get; set; }
}
}

@ -40,7 +40,7 @@ public class FeeTemplateDetailReq
/// <summary>
/// 结算对象类型
/// </summary>
public string CustomerType { get; set; }
public CustomerTypeEnum? CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -1,4 +1,5 @@
using DS.Module.Core;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
@ -38,9 +39,11 @@ public class FeeTemplateDetailRes
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 结算对象类型
/// 客户类型
/// </summary>
public string CustomerType { get; set; }
public CustomerTypeEnum? CustomerType { get; set; }
public string CustomerTypeText { get { return CustomerType.HasValue ? CustomerType.Value.GetDescription() : string.Empty; } }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -32,21 +32,39 @@ public class FeeCode : BaseModel<long>
public long CurrencyId { get; set; }
/// <summary>
/// 默认计费标准
/// 默认计费标准代码
/// </summary>
[SugarColumn(ColumnDescription = "默认计费标准", IsNullable = true, Length = 50)]
[SugarColumn(ColumnDescription = "默认计费标准代码", IsNullable = true, Length = 50)]
public string DefaultUnit { get; set; }
/// <summary>
/// 默认计费标准名称
/// </summary>
[SugarColumn(ColumnDescription = "默认计费标准名称", IsNullable = true, Length = 50)]
public string DefaultUnitName { get; set; }
/// <summary>
/// 默认收费客户类型
/// </summary>
[SugarColumn(ColumnDescription = "默认收费客户类型", IsNullable = true, Length = 50)]
public string DefaultDebit { get; set; }
/// <summary>
/// 默认收费客户类型名称
/// </summary>
[SugarColumn(ColumnDescription = "默认收费客户类型名称", IsNullable = true, Length = 50)]
public string DefaultDebitName { get; set; }
/// <summary>
/// 默认付费客户类型
/// </summary>
[SugarColumn(ColumnDescription = "默认付费客户类型", IsNullable = true ,Length =50)]
public string DefaultCredit { get; set; }
/// <summary>
/// 默认付费客户类型名称
/// </summary>
[SugarColumn(ColumnDescription = "默认付费客户类型名称", IsNullable = true, Length = 50)]
public string DefaultCreditName { get; set; }
/// <summary>
/// 海运 海运相关模块使用
/// </summary>
[SugarColumn(ColumnDescription = "海运", DefaultValue = "0")]

@ -43,4 +43,7 @@ public class FeeCurrency: BaseModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
[Navigate(NavigateType.OneToMany, nameof(FeeCurrencyExchange.CurrencyId))]
public List<FeeCurrencyExchange> Exchanges { get; set; }
}

@ -1,4 +1,5 @@
using DS.Module.Core.Data;
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
using System;
using System.Collections.Generic;
@ -35,10 +36,10 @@ namespace DS.WMS.Core.Fee.Entity
[SugarColumn(ColumnDescription = "结算对象", Length = 100, IsNullable = true)]
public string CustomerName { get; set; }
/// <summary>
/// 结算对象类型
/// 客户类型
/// </summary>
[SugarColumn(ColumnDescription = "结算对象类型", IsNullable = true, Length = 50)]
public string CustomerType { get; set; }
[SugarColumn(ColumnDescription = "客户类型", IsNullable = true)]
public CustomerTypeEnum? CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -57,11 +57,12 @@ namespace DS.WMS.Core.Fee.Entity
/// </summary>
[SugarColumn(ColumnDescription = "费用对象Id")]
public long CustomerId { get; set; }
/// <summary>
/// 费用对象类型
/// 客户类型
/// </summary>
[SugarColumn(ColumnDescription = "费用对象类型", IsNullable = true, Length = 50)]
public string CustomerType { get; set; }
[SugarColumn(ColumnDescription = "客户类型", IsNullable = true)]
public CustomerTypeEnum? CustomerType { get; set; }
/// <summary>
/// 费用标准
@ -88,7 +89,7 @@ namespace DS.WMS.Core.Fee.Entity
/// 币别
/// </summary>
[SugarColumn(ColumnDescription = "币别", Length = 20)]
public string Currency { get; set; }
public string Currency { get; set; } = "RMB";
/// <summary>
/// 汇率
@ -151,13 +152,13 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary>
/// 审核人
/// </summary>
[SugarColumn(ColumnDescription = "审核人",IsNullable = true, Length = 50)]
[SugarColumn(ColumnDescription = "审核人", IsNullable = true, Length = 50)]
public string AuditOperator { get; set; }
/// <summary>
/// 审核日期
/// </summary>
[SugarColumn(ColumnDescription = "审核日期")]
public DateTime AuditDate { get; set; }
[SugarColumn(ColumnDescription = "审核日期", IsNullable = true)]
public DateTime? AuditDate { get; set; }
/// <summary>
/// 是否机密费用
@ -194,7 +195,7 @@ namespace DS.WMS.Core.Fee.Entity
/// </summary>
[SugarColumn(ColumnDescription = "排序")]
public int? OrderNo { get; set; } = 100;
/// <summary>
/// 费用状态
/// </summary>
@ -318,7 +319,7 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary>
/// 是否财务费用
/// </summary>
[SugarColumn(ColumnDescription = "是否财务费用", IsNullable = true, DefaultValue ="0")]
[SugarColumn(ColumnDescription = "是否财务费用", IsNullable = true, DefaultValue = "0")]
public bool IsAcc { get; set; }
/// <summary>
@ -330,8 +331,8 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary>
///
/// </summary>
[SugarColumn(ColumnDescription = "StatementNo",IsNullable = true, Length = 50)]
public string StatementNo{ get; set; }
[SugarColumn(ColumnDescription = "StatementNo", IsNullable = true, Length = 50)]
public string StatementNo { get; set; }
/// <summary>
/// 核算单位

@ -41,6 +41,6 @@ public class FeeTemplate: BaseOrgModel<long>
[SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
[Navigate(NavigateType.OneToMany, nameof(FeeTemplateDetail.Id))]
[Navigate(NavigateType.OneToMany, nameof(FeeTemplateDetail.TemplateId))]
public List<FeeTemplateDetail> Details { get; set; }
}

@ -1,4 +1,5 @@
using DS.Module.Core.Data;
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.Fee.Entity
@ -40,10 +41,10 @@ namespace DS.WMS.Core.Fee.Entity
[SugarColumn(ColumnDescription = "结算对象", Length = 100, IsNullable = true)]
public string CustomerName { get; set; }
/// <summary>
/// 结算对象类型
/// 客户类型
/// </summary>
[SugarColumn(ColumnDescription = "结算对象类型", IsNullable = true, Length = 50)]
public string CustomerType { get; set; }
[SugarColumn(ColumnDescription = "客户类型", IsNullable = true)]
public CustomerTypeEnum? CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -1,5 +1,6 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
namespace DS.WMS.Core.Fee.Interface;
@ -13,11 +14,12 @@ public interface IFeeRecordService
DataResult<List<FeeRecordRes>> GetListByPage(PageRequest request);
/// <summary>
/// 获取详情
/// 提交
/// </summary>
/// <param name="id"></param>
/// <param name="bid">业务ID</param>
/// <param name="items">要提交的费用记录</param>
/// <returns></returns>
DataResult<FeeRecordRes> Get(string id);
DataResult InsertOrUpdate(long bid, IEnumerable<FeeRecord> items);
/// <summary>
/// 根据费用模板引入
@ -27,18 +29,11 @@ public interface IFeeRecordService
/// <returns></returns>
DataResult CreateByTemplate(long bid, params long[] tidArray);
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
DataResult Edit(FeeRecordReq model);
/// <summary>
/// 删除
/// </summary>
/// <param name="id"></param>
/// <param name="ids"></param>
/// <returns></returns>
DataResult Delete(long id);
DataResult Delete(params long[] ids);
}

@ -14,6 +14,8 @@ namespace DS.WMS.Core.Fee.Method
{
public class FeeRecordService : IFeeRecordService
{
readonly string DefaultCurrency = "RMB";
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
@ -45,51 +47,43 @@ namespace DS.WMS.Core.Fee.Method
}
/// <summary>
/// 编辑
/// 提交
/// </summary>
/// <param name="req"></param>
/// <param name="bid">业务ID</param>
/// <param name="items">要提交的费用记录</param>
/// <returns></returns>
public DataResult Edit(FeeRecordReq req)
public DataResult InsertOrUpdate(long bid, IEnumerable<FeeRecord> items)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
try
{
if (tenantDb.Queryable<FeeRecord>()
.Where(x => x.BusinessId == req.BusinessId && x.FeeType == req.FeeType && x.FeeId == req.FeeId).Any())
tenantDb.Ado.BeginTran();
foreach (var item in items)
{
return DataResult.Failed("费用记录已存在", MultiLanguageConst.FeeRecordExist);
item.BusinessId = bid;
item.FeeStatus = FeeStatusEnum.Entering;
if (item.Id == 0)
{
tenantDb.Insertable(item).ExecuteCommand();
}
else
{
tenantDb.Updateable(item).ExecuteCommand();
}
}
tenantDb.Ado.CommitTran();
var data = req.Adapt<FeeRecord>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
var list = items.Select(x => x.Adapt<FeeRecordRes>()).ToList();
return DataResult.Successed("保存成功", list, MultiLanguageConst.DataUpdateSuccess);
}
else
catch
{
var info = tenantDb.Queryable<FeeRecord>().Where(x => x.Id == req.Id).First();
info = req.Adapt(info);
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
tenantDb.Ado.RollbackTran();
//throw;
return DataResult.Failed("保存失败", MultiLanguageConst.DataUpdateFailed);
}
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id">费用记录ID</param>
/// <returns></returns>
public DataResult<FeeRecordRes> Get(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeRecord>()
.Where(x => x.Id == long.Parse(id))
.Select<FeeRecordRes>()
.First();
return DataResult<FeeRecordRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
@ -104,7 +98,7 @@ namespace DS.WMS.Core.Fee.Method
bool hasExists = tenantDb.Queryable<FeeRecord>().LeftJoin<FeeTemplateDetail>((x, y) =>
x.FeeId == y.FeeId && x.FeeType == y.FeeType).Any((x, y) =>
x.BusinessId == bid && tidArray.Contains(y.TemplateId) && !x.Deleted && !y.Deleted);
x.BusinessId == bid && tidArray.Contains(y.TemplateId) && !y.Deleted);
if (hasExists)
return DataResult.Failed("费用记录已存在", MultiLanguageConst.FeeRecordExist);
@ -132,28 +126,49 @@ namespace DS.WMS.Core.Fee.Method
x.Note
}).ToList();
//若计价货币单位不等于默认货币则尝试获取最新汇率
var exDetails = details.FindAll(x => x.Currency != DefaultCurrency);
if (exDetails.Count > 0)
{
var codes = exDetails.Select(x => x.Currency).Distinct().ToList();
var currencies = tenantDb.Queryable<FeeCurrency>().Where(x => codes.Contains(x.CodeName)).Includes(x => x.Exchanges).ToList();
foreach (var item in exDetails)
{
var currency = currencies.Find(x => x.CodeName == item.Currency);
//if (currency != null)
//{
// item.
//}
}
}
List<FeeRecord> records = new List<FeeRecord>(details.Count);
records.AddRange(details.Select(x => x.Adapt<FeeRecord>()));
foreach (var item in details)
{
var record = item.Adapt<FeeRecord>();
record.BusinessId = bid;
record.SubmitDate = DateTime.Now;
records.Add(record);
}
return DataResult.Success(records, MultiLanguageConst.DataCreateSuccess) as DataResult;
int result = tenantDb.Insertable(records).ExecuteCommand();
return result > 0 ? DataResult.Successed("保存成功", records, MultiLanguageConst.DataCreateSuccess) : DataResult.Successed("操作失败!", MultiLanguageConst.Operation_Failed);
}
/// <summary>
/// 删除(录入状态)
/// </summary>
/// <param name="id">费用记录ID</param>
/// <param name="ids">费用记录ID</param>
/// <returns></returns>
public DataResult Delete(long id)
public DataResult Delete(params long[] ids)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var record = tenantDb.Queryable<FeeRecord>().First(x => x.Id == id && !x.Deleted);
if (record == null)
return DataResult.Failed("未能找到费用记录", MultiLanguageConst.FeeRecordNone);
if (record.FeeStatus != FeeStatusEnum.Entering)
if (tenantDb.Queryable<FeeRecord>().Any(x => ids.Contains(x.Id) && x.FeeStatus != FeeStatusEnum.Entering))
return DataResult.Failed("只能删除状态为‘录入’的费用", MultiLanguageConst.FeeRecordDelete);
int result = tenantDb.Deleteable(new FeeRecord { Id = id }).ExecuteCommand();
int result = tenantDb.Deleteable<FeeRecord>(x => ids.Contains(x.Id)).ExecuteCommand();
return result > 0 ? DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess) : DataResult.Successed("删除失败!", MultiLanguageConst.Operation_Failed);
}
}

@ -1,6 +1,9 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using Mapster;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
@ -35,44 +38,50 @@ namespace DS.WMS.FeeApi.Controllers
}
/// <summary>
/// 详情
/// 提交费用
/// </summary>
/// <param name="id"></param>
/// <param name="recordSubmit">费用提交参数</param>
/// <returns></returns>
[HttpGet]
[Route("Get")]
public DataResult<FeeRecordRes> Get([FromQuery] string id)
[HttpPost, Route("Submit")]
public DataResult Submit([FromBody] FeeRecordSubmit recordSubmit)
{
var res = _invokeService.Get(id);
return res;
if (recordSubmit == null)
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
if (recordSubmit.Items.Any(x => x.FeeStatus != FeeStatusEnum.Entering))
return DataResult.Failed("只能提交状态为‘录入’的费用", MultiLanguageConst.IllegalRequest);
var list = recordSubmit.Items.Select(x => x.Adapt<FeeRecord>());
return _invokeService.InsertOrUpdate(recordSubmit.BusinessId, list);
}
/// <summary>
/// 编辑
/// 根据一组模板ID创建费用记录引入模板
/// </summary>
/// <param name="model"></param>
/// <param name="request">请求参数</param>
/// <returns></returns>
[HttpPost]
[Route("Edit")]
public DataResult Edit([FromBody] FeeRecordReq model)
[HttpPost, Route("CreateByTemplate")]
public DataResult CreateByTemplate([FromBody] FeeRecordByTemplate request)
{
var res = _invokeService.Edit(model);
if (request == null || request.TemplateIdList.Length == 0)
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
var res = _invokeService.CreateByTemplate(request.BusinessId, request.TemplateIdList);
return res;
}
//[HttpPost, Route("CreateByTemplate")]
//public DataResult CreateByTemplate(long bid, params long[] tidArray)
//{
//}
/// <summary>
/// 根据费用记录ID删除
/// </summary>
/// <param name="model">费用记录ID</param>
/// <returns></returns>
[HttpPost, Route("Delete")]
public DataResult Delete(string id)
public DataResult Delete([FromBody] IdModel model)
{
if (!long.TryParse(id, out long value))
return DataResult.Error("参数无效", MultiLanguageConst.IllegalRequest) as DataResult;
if (model == null || model.Ids.Length == 0)
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
var res = _invokeService.Delete(value);
var res = _invokeService.Delete(model.Ids);
return res;
}
}

@ -5,5 +5,6 @@
</PropertyGroup>
<PropertyGroup>
<ActiveDebugProfile>http</ActiveDebugProfile>
<NameOfLastUsedPublishProfile>D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup>
</Project>

@ -61,3 +61,87 @@
2024-05-21 10:50:31.7534 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-21 10:50:31.7534 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 10:50:31.7534 Info Configuration initialized.
2024-05-21 11:22:57.7924 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 11:22:57.8036 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 11:22:57.8036 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 11:22:57.8179 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-21 11:22:57.8179 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-21 11:22:57.8179 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 11:22:57.8303 Info Configuration initialized.
2024-05-21 11:24:15.5555 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 11:24:15.5669 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 11:24:15.5669 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 11:24:15.5788 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-21 11:24:15.5788 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-21 11:24:15.5788 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 11:24:15.5788 Info Configuration initialized.
2024-05-21 13:44:32.9839 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 13:44:32.9926 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 13:44:32.9926 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 13:44:32.9926 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-21 13:44:32.9926 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-21 13:44:32.9926 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 13:44:33.0157 Info Configuration initialized.
2024-05-21 14:29:49.6133 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 14:29:49.6297 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 14:29:49.6297 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 14:29:49.6432 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-21 14:29:49.6432 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-21 14:29:49.6432 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 14:29:49.6590 Info Configuration initialized.
2024-05-21 14:39:40.6415 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 14:39:40.6415 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 14:39:40.6575 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 14:39:40.6575 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-21 14:39:40.6734 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-21 14:39:40.6734 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 14:39:40.6734 Info Configuration initialized.
2024-05-21 15:10:16.2099 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 15:10:16.2099 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 15:10:16.2099 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 15:10:16.2366 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-21 15:10:16.2366 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-21 15:10:16.2366 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 15:10:16.2505 Info Configuration initialized.
2024-05-21 15:19:18.4624 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 15:19:18.4772 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 15:19:18.4772 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 15:19:18.4908 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-21 15:19:18.4908 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-21 15:19:18.4908 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 15:19:18.5027 Info Configuration initialized.
2024-05-21 15:27:50.9948 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 15:27:51.0090 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 15:27:51.0090 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 15:27:51.0226 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-21 15:27:51.0226 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-21 15:27:51.0226 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 15:27:51.0226 Info Configuration initialized.
2024-05-21 15:34:32.3378 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 15:34:32.3489 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 15:34:32.3489 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 15:34:32.3489 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-21 15:34:32.3661 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-21 15:34:32.3661 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 15:34:32.3661 Info Configuration initialized.
2024-05-21 15:36:45.2418 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 15:36:45.2534 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 15:36:45.2534 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 15:36:45.2534 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-21 15:36:45.2534 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-21 15:36:45.2534 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 15:36:45.2534 Info Configuration initialized.
2024-05-21 15:40:35.6934 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 15:40:35.6934 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 15:40:35.6934 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 15:40:35.7166 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-21 15:40:35.7214 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-21 15:40:35.7214 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 15:40:35.7214 Info Configuration initialized.
2024-05-21 16:09:52.6774 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-21 16:09:52.6774 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-21 16:09:52.6774 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-21 16:09:52.6995 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-21 16:09:52.7043 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-21 16:09:52.7043 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-21 16:09:52.7043 Info Configuration initialized.

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>D:\Publish\DS8\FeeApi</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
</PropertyGroup>
</Project>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-05-21T09:13:36.4091775Z;True|2024-05-21T14:41:18.8486299+08:00;True|2024-05-21T11:04:27.3649637+08:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

@ -52,6 +52,20 @@ public class SaasTest
// tenantDb.CodeFirst.InitTables(typeof(CodeCountry));
Assert.True(true);
}
[Fact]
public void SaasFeeTest()
{
Type[] types = Assembly
.LoadFrom("DS.WMS.Core.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
.GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Fee.Entity"))//命名空间过滤,当然你也可以写其他条件过滤
.ToArray();
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持
tenantDb.CodeFirst.InitTables(types);
Assert.True(true);
}
[Fact]
public void ClientBatchEdit()

Loading…
Cancel
Save