From 7575ca32ccb95e308d791ed9e812bf91cb2a6007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Mon, 27 May 2024 14:19:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B9=E7=94=A8=E8=AE=B0=E5=BD=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=8B=A5=E5=B9=B2=E8=BF=94=E5=9B=9E=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.AdminApi/Logs/internal-nlog.txt | 56 +++++++++++++++++ .../DS.WMS.Core/Fee/Dtos/FeeRecordReq.cs | 25 -------- .../DS.WMS.Core/Fee/Dtos/FeeRecordRes.cs | 26 ++++++-- .../DS.WMS.Core/Fee/Entity/FeeRecord.cs | 15 +++-- .../Fee/Method/FeeRecordService.cs | 62 ++++++++++++++----- .../DS.WMS.Core/Flow/Dtos/FlowRoot.cs | 15 ++++- .../Flow/Method/ClientFlowInstanceService.cs | 2 + .../Flow/Method/FlowRuntimeService.cs | 2 +- .../Controllers/FeeRecordController.cs | 18 +----- .../DS.WMS.FeeApi/Logs/internal-nlog.txt | 56 +++++++++++++++++ .../FolderProfile1.pubxml.user | 2 +- 11 files changed, 205 insertions(+), 74 deletions(-) diff --git a/ds-wms-service/DS.WMS.AdminApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.AdminApi/Logs/internal-nlog.txt index 3b43c91e..fac3172a 100644 --- a/ds-wms-service/DS.WMS.AdminApi/Logs/internal-nlog.txt +++ b/ds-wms-service/DS.WMS.AdminApi/Logs/internal-nlog.txt @@ -719,3 +719,59 @@ 2024-05-24 17:08:50.0582 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config 2024-05-24 17:08:50.0582 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-05-24 17:08:50.0712 Info Configuration initialized. +2024-05-27 09:31:25.0506 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 09:31:25.0612 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 09:31:25.0612 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 09:31:25.0740 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-27 09:31:25.0740 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-05-27 09:31:25.0740 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 09:31:25.0856 Info Configuration initialized. +2024-05-27 09:56:58.8809 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 09:56:58.8963 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 09:56:58.8963 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 09:56:58.9134 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-27 09:56:58.9134 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-05-27 09:56:58.9134 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 09:56:58.9134 Info Configuration initialized. +2024-05-27 10:00:29.4293 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 10:00:29.4462 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 10:00:29.4462 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 10:00:29.4462 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-27 10:00:29.4710 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-05-27 10:00:29.4745 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 10:00:29.4745 Info Configuration initialized. +2024-05-27 10:02:22.4137 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 10:02:22.4353 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 10:02:22.4410 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 10:02:22.4563 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-27 10:02:22.4563 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-05-27 10:02:22.4563 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 10:02:22.4759 Info Configuration initialized. +2024-05-27 10:49:12.1038 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 10:49:12.1175 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 10:49:12.1175 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 10:49:12.1332 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-27 10:49:12.1332 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-05-27 10:49:12.1417 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 10:49:12.1417 Info Configuration initialized. +2024-05-27 11:35:35.6844 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 11:35:35.6957 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 11:35:35.6957 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 11:35:35.7085 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-27 11:35:35.7085 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-05-27 11:35:35.7085 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 11:35:35.7085 Info Configuration initialized. +2024-05-27 11:49:32.9294 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 11:49:32.9493 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 11:49:32.9493 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 11:49:32.9658 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-27 11:49:32.9743 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-05-27 11:49:32.9743 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 11:49:32.9743 Info Configuration initialized. +2024-05-27 14:00:37.4535 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 14:00:37.4660 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 14:00:37.4660 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 14:00:37.4812 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-27 14:00:37.4812 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-05-27 14:00:37.4888 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 14:00:37.4888 Info Configuration initialized. diff --git a/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeRecordReq.cs b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeRecordReq.cs index fd59c2da..a03861d6 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeRecordReq.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeRecordReq.cs @@ -119,25 +119,6 @@ public class FeeRecordReq /// Desc:申请开票金额 /// public decimal? OrderInvoiceAmount { get; set; } = 0; - /// - /// 提交日期 - /// - public DateTime? SubmitDate { get; set; } - - - /// - /// 审核人Id - /// - public long? AuditBy { get; set; } - - /// - /// 审核人 - /// - public string AuditOperator { get; set; } - /// - /// 审核日期 - /// - public DateTime? AuditDate { get; set; } /// /// 是否机密费用 @@ -295,13 +276,7 @@ public class FeeRecordReq /// 发票自助连接 /// public string InvLinkId { get; set; } - - /// - /// 提交人 - /// - public string SubmitBy { get; set; } - /// /// 备注 /// diff --git a/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeRecordRes.cs b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeRecordRes.cs index 83787762..bea9db8c 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeRecordRes.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeRecordRes.cs @@ -129,12 +129,18 @@ public class FeeRecordRes /// Desc:申请开票金额 /// public decimal? OrderInvoiceAmount { get; set; } = 0; + + public long? SubmitBy { get; set; } + /// + /// 提交人 + /// + public string SubmitByName { get; set; } + /// /// 提交日期 /// public DateTime? SubmitDate { get; set; } - /// /// 审核人Id /// @@ -319,14 +325,24 @@ public class FeeRecordRes public string InvLinkId { get; set; } /// - /// 提交人 + /// 备注 + /// + public string Note { get; set; } = ""; + + /// + /// 创建人 /// - public string SubmitBy { get; set; } + public long CreateBy { get; set; } /// - /// 备注 + /// 创建人名字 /// - public string Note { get; set; } = ""; + public string CreateByName { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } /// /// 修改人 diff --git a/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs b/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs index 93af9a6e..7fc447de 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs @@ -153,13 +153,7 @@ namespace DS.WMS.Core.Fee.Entity /// [SugarColumn(ColumnDescription = "申请开票金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] public decimal? OrderInvoiceAmount { get; set; } = 0; - /// - /// 提交日期 - /// - [SugarColumn(ColumnDescription = "提交日期")] - public DateTime? SubmitDate { get; set; } - - + /// /// 审核人Id /// @@ -368,11 +362,16 @@ namespace DS.WMS.Core.Fee.Entity [SugarColumn(ColumnDescription = "发票自助连接", IsNullable = true, Length = 50)] public string InvLinkId { get; set; } + /// + /// 提交日期 + /// + [SugarColumn(ColumnDescription = "提交日期")] + public DateTime? SubmitDate { get; set; } /// /// 提交人 /// [SugarColumn(ColumnDescription = "提交人", IsNullable = true, Length = 50)] - public string SubmitBy { get; set; } + public long? SubmitBy { get; set; } [SugarColumn(ColumnDescription = "当前审批ID", IsNullable = true)] public long? FlowId { get; set; } diff --git a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeRecordService.cs b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeRecordService.cs index 19b50e60..169bdbe6 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeRecordService.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeRecordService.cs @@ -55,14 +55,23 @@ namespace DS.WMS.Core.Fee.Method .ToQueryPage(request.PageCondition); //关联用户名称 - var userIds = data.Data.Where(x => x.UpdateBy.HasValue).Select(x => x.UpdateBy.Value).Distinct().ToList(); + var userIds = data.Data.Where(x => x.UpdateBy.HasValue).Select(x => x.UpdateBy.Value) + //.Union(data.Data.Where(x => x.SubmitBy.HasValue).Select(x => x.SubmitBy.Value)) + .Union(data.Data.Select(x => x.CreateBy)).Distinct(); var users = db.Queryable().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToList(); foreach (var item in data.Data) { + item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName; + if (item.UpdateBy.HasValue) { item.UpdateByName = users.Find(x => x.Id == item.UpdateBy.Value)?.UserName; } + + //if (item.SubmitBy.HasValue) + //{ + // item.SubmitByName = users.Find(x => x.Id == item.SubmitBy.Value)?.UserName; + //} } return data; @@ -111,7 +120,7 @@ namespace DS.WMS.Core.Fee.Method var tenantDb = saasService.GetBizDbScopeById(user.TenantId); if (IsFeeLocked(bid)) - return DataResult.Failed("当前业务已费用锁定,禁止修改", MultiLanguageConst.Operation_Failed); + return DataResult.Failed("当前业务已费用锁定,禁止提交", MultiLanguageConst.Operation_Failed); try { @@ -144,7 +153,6 @@ namespace DS.WMS.Core.Fee.Method foreach (var item in items) { - item.SubmitDate = dtNow; item.FeeStatus = FeeStatus.Entering; if (item.Id == 0) @@ -156,13 +164,15 @@ namespace DS.WMS.Core.Fee.Method { tenantDb.Updateable(item).IgnoreColumns(x => new { - //x.FeeStatus, + x.FeeStatus, x.CreateBy, x.CreateTime, x.BusinessId, x.DeleteBy, x.Deleted, - x.DeleteTime + x.DeleteTime, + x.SubmitDate, + x.SubmitBy }).ExecuteCommand(); } } @@ -312,6 +322,7 @@ namespace DS.WMS.Core.Fee.Method if (fees.IsNullOrEmpty()) return DataResult.Failed($"未能获取费用信息,提交失败", MultiLanguageConst.Operation_Failed); + //业务状态检测 if (IsFeeLocked(fees[0].BusinessId)) return DataResult.Failed("当前业务已费用锁定,禁止修改", MultiLanguageConst.Operation_Failed); @@ -334,7 +345,15 @@ namespace DS.WMS.Core.Fee.Method if (!result.Succeeded) return result; - int rows = tenantDb.Updateable(fees).UpdateColumns(x => new { x.Id, x.FeeStatus, x.UpdateBy, x.UpdateTime, x.FlowId }).ExecuteCommand(); + + int rows = tenantDb.Updateable(fees).UpdateColumns(x => new + { + x.Id, + x.FeeStatus, + x.SubmitBy, + x.SubmitDate, + x.FlowId + }).ExecuteCommand(); return rows > 0 ? DataResult.Successed("提交成功!", MultiLanguageConst.DataUpdateSuccess) : DataResult.Failed("提交失败!", MultiLanguageConst.Operation_Failed); } @@ -368,8 +387,8 @@ namespace DS.WMS.Core.Fee.Method //变更状态为提交审核 item.FeeStatus = FeeStatus.AuditSubmitted; - item.UpdateBy = long.Parse(user.UserId); - item.UpdateTime = dtNow; + item.SubmitBy = long.Parse(user.UserId); + item.SubmitDate = dtNow; item.FlowId = instance.Id; } } @@ -407,8 +426,8 @@ namespace DS.WMS.Core.Fee.Method //变更状态为申请删除/修改 item.FeeStatus = auditType == FeeAuditType.ApplyDeletion ? FeeStatus.ApplyDeletion : FeeStatus.ApplyModification; - item.UpdateBy = long.Parse(user.UserId); - item.UpdateTime = dtNow; + item.SubmitBy = long.Parse(user.UserId); + item.SubmitDate = dtNow; item.FlowId = instance.Id; } } @@ -462,11 +481,18 @@ namespace DS.WMS.Core.Fee.Method { Id = fee.Id, FeeStatus = targetStatus.Value, - UpdateBy = long.Parse(user.UserId), - UpdateTime = DateTime.Now, + AuditBy = long.Parse(user.UserId), + AuditDate = DateTime.Now, FlowId = null }; - int rows = tenantDb.Updateable(entity).UpdateColumns(x => new { x.Id, x.FeeStatus, x.UpdateBy, x.UpdateTime, x.FlowId }).ExecuteCommand(); + int rows = tenantDb.Updateable(entity).UpdateColumns(x => new + { + x.Id, + x.FeeStatus, + x.AuditBy, + x.AuditDate, + x.FlowId + }).ExecuteCommand(); return rows > 0 ? DataResult.Successed("提交成功!", MultiLanguageConst.DataUpdateSuccess) : DataResult.Failed("提交失败!", MultiLanguageConst.Operation_Failed); } @@ -486,6 +512,9 @@ namespace DS.WMS.Core.Fee.Method FlowId = x.FlowId }).ToList(); + if (fees.IsNullOrEmpty()) + return DataResult.Failed("未能找到费用记录", MultiLanguageConst.Operation_Failed); + //未在审批状态中 var fees2 = fees.FindAll(x => x.FlowId == null || x.FeeStatus != FeeStatus.AuditSubmitted || x.FeeStatus != FeeStatus.ApplyModification || x.FeeStatus != FeeStatus.ApplyDeletion).ToList(); @@ -517,12 +546,12 @@ namespace DS.WMS.Core.Fee.Method break; } - item.UpdateBy = long.Parse(user.UserId); - item.UpdateTime = dtNow; + item.SubmitBy = long.Parse(user.UserId); + item.SubmitDate = dtNow; item.FlowId = null; } - int rows = tenantDb.Updateable(fees).UpdateColumns(x => new { x.Id, x.FeeStatus, x.UpdateBy, x.UpdateTime, x.FlowId }).ExecuteCommand(); + int rows = tenantDb.Updateable(fees).UpdateColumns(x => new { x.Id, x.FeeStatus, x.SubmitBy, x.SubmitDate, x.FlowId }).ExecuteCommand(); return rows > 0 ? DataResult.Successed("提交成功!", MultiLanguageConst.DataUpdateSuccess) : DataResult.Failed("提交失败!", MultiLanguageConst.Operation_Failed); } @@ -539,6 +568,5 @@ namespace DS.WMS.Core.Fee.Method x.AuditType == auditType).First(); } - } } diff --git a/ds-wms-service/DS.WMS.Core/Flow/Dtos/FlowRoot.cs b/ds-wms-service/DS.WMS.Core/Flow/Dtos/FlowRoot.cs index eb77fd50..dcf571a6 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Dtos/FlowRoot.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Dtos/FlowRoot.cs @@ -307,7 +307,18 @@ public class FlowTag /// public enum TagState { + /// + /// 通过 + /// Ok = 1, - No, - Reject + + /// + /// 不通过 + /// + No = 2, + + /// + /// 驳回 + /// + Reject = 3 } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowInstanceService.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowInstanceService.cs index 8c9c95c8..4d2a42b8 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowInstanceService.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowInstanceService.cs @@ -60,6 +60,8 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc return makerList; } + + protected override FlowRuntimeService CreateRuntimeService(FlowInstance instance) { return new FlowRuntimeService(instance, db, saasService, user); diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowRuntimeService.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowRuntimeService.cs index 8bf7957c..6810acba 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowRuntimeService.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowRuntimeService.cs @@ -231,7 +231,7 @@ public class FlowRuntimeService /// /// /// - public string GetNextConditionNodeId(FlowChild parent) + public virtual string GetNextConditionNodeId(FlowChild parent) { var conditionNodes = GetFlowConditions(parent); var conditionId = string.Empty; diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeRecordController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeRecordController.cs index 2336db2d..f313128c 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeRecordController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeRecordController.cs @@ -62,18 +62,6 @@ namespace DS.WMS.FeeApi.Controllers return DataResult.Success(stat); } - /// - /// 根据费用明细转换为模板明细 - /// - /// 费用明细ID - /// - [HttpGet, Route("ReadAsTemplate")] - public DataResult> ReadAsTemplate([FromQuery] long[] ids) - { - var res = _feeService.ReadAsTemplate(ids); - return res; - } - /// /// 提交费用 /// @@ -85,8 +73,8 @@ namespace DS.WMS.FeeApi.Controllers if (recordSubmit == null) return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest); - if (recordSubmit.Items.Any(x => x.FeeStatus != FeeStatus.Entering)) - return DataResult.Failed("只能提交状态为‘录入’的费用", MultiLanguageConst.IllegalRequest); + if (recordSubmit.Items.Any(x => x.FeeStatus != FeeStatus.Entering && x.FeeStatus != FeeStatus.AuditPassed)) + return DataResult.Failed("只能提交状态为‘录入’或‘审核通过’的费用", MultiLanguageConst.IllegalRequest); var list = recordSubmit.Items.Select(x => x.Adapt()); return _feeService.InsertOrUpdate(recordSubmit.BusinessId, list); @@ -97,7 +85,7 @@ namespace DS.WMS.FeeApi.Controllers /// /// 请求参数 /// - [HttpPost, Route("CreateByTemplate"), NonAction] + [HttpPost, Route("CreateByTemplate")] public DataResult CreateByTemplate([FromBody] FeeRecordByTemplate request) { if (request == null || request.TemplateIdList.Length == 0) diff --git a/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt index 34b01b3e..34a90687 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt +++ b/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt @@ -425,3 +425,59 @@ 2024-05-24 17:54:30.2256 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-24 17:54:30.2256 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-05-24 17:54:30.2256 Info Configuration initialized. +2024-05-27 09:31:25.0411 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 09:31:25.0411 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 09:31:25.0560 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 09:31:25.0560 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-27 09:31:25.0560 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-27 09:31:25.0718 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 09:31:25.0718 Info Configuration initialized. +2024-05-27 09:56:59.1674 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 09:56:59.1867 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 09:56:59.1867 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 09:56:59.2068 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-27 09:56:59.2151 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-27 09:56:59.2151 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 09:56:59.2254 Info Configuration initialized. +2024-05-27 10:00:29.8274 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 10:00:29.8407 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 10:00:29.8407 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 10:00:29.8546 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-27 10:00:29.8546 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-27 10:00:29.8546 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 10:00:29.8682 Info Configuration initialized. +2024-05-27 10:02:22.8428 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 10:02:22.8582 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 10:02:22.8582 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 10:02:22.8739 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-27 10:02:22.8739 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-27 10:02:22.8739 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 10:02:22.8883 Info Configuration initialized. +2024-05-27 10:49:12.4099 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 10:49:12.4262 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 10:49:12.4262 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 10:49:12.4476 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-27 10:49:12.4569 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-27 10:49:12.4569 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 10:49:12.4569 Info Configuration initialized. +2024-05-27 11:35:35.9738 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 11:35:35.9738 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 11:35:35.9738 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 11:35:35.9964 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-27 11:35:35.9964 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-27 11:35:35.9964 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 11:35:36.0081 Info Configuration initialized. +2024-05-27 11:49:33.3229 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 11:49:33.3360 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 11:49:33.3360 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 11:49:33.3520 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-27 11:49:33.3520 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-27 11:49:33.3520 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 11:49:33.3657 Info Configuration initialized. +2024-05-27 14:00:36.8507 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-05-27 14:00:36.8640 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-05-27 14:00:36.8640 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-05-27 14:00:36.8773 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-27 14:00:36.8773 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-27 14:00:36.8773 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-05-27 14:00:36.8773 Info Configuration initialized. diff --git a/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user b/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user index ac460fff..0e1339ce 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>D:\Publish\DS8\FeeApi - True|2024-05-23T09:19:32.8154451Z||;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||; + True|2024-05-27T00:49:54.3933663Z||;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||; \ No newline at end of file