From 96a97b7867ea97de1d09eceb41125f6463729695 Mon Sep 17 00:00:00 2001 From: cjy Date: Wed, 11 Sep 2024 14:36:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=8E=88=E6=9D=83=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ds-wms-service/DS.WMS.Test/OpTest.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ds-wms-service/DS.WMS.Test/OpTest.cs b/ds-wms-service/DS.WMS.Test/OpTest.cs index 4e4a939b..3efdbb66 100644 --- a/ds-wms-service/DS.WMS.Test/OpTest.cs +++ b/ds-wms-service/DS.WMS.Test/OpTest.cs @@ -2,16 +2,19 @@ using System.IO; using System.Reflection; using DS.Module.Core; using DS.Module.Core.Extensions; +using DS.Module.Core.Helpers; using DS.Module.SqlSugar; using DS.WMS.Core.Code.Interface; using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Interface; using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Interface; +using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using NPOI.HPSF; +using Org.BouncyCastle.Ocsp; using SharpCompress.Common; using SqlSugar; using SqlSugar.IOC; @@ -47,13 +50,16 @@ public class OpTest Assert.True(true); } + /// + /// ×⻧Óû§ÊÚȨÊý + /// [Fact] public void OpTest2() { //var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); //var data = _commonSetService.GetSequenceNext(); - + var str = EncrypteHelper.EncryptData("300", "ba31a8758af1c6b7"); Assert.True(true); } From f2c67d6b809a6479cdb9b00f8b877dead0007829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Wed, 11 Sep 2024 13:54:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=92=A4=E9=94=80=E5=90=8E=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Info/Method/ClientInfoService.cs | 8 ++++---- .../DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs b/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs index b082892a..4d900bc6 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs @@ -68,10 +68,6 @@ public class ClientInfoService : ServiceBase, IClientInfoService if (await queryable.AnyAsync(x => (SqlFunc.IsNullOrEmpty(x.Tel) && SqlFunc.IsNullOrEmpty(x.Mobile)) || (SqlFunc.IsNullOrEmpty(x.Email) && SqlFunc.IsNullOrEmpty(x.QQ)))) return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ClientInfoIncomplete)); - var template = await FindTemplateAsync(INFO_CLIENT_TASK); - if (template == null) - return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound)); - if (await taskService.Value.HasAuthorizedAsync()) { var requests = list.Select(x => new TaskCreationRequest @@ -106,6 +102,10 @@ public class ClientInfoService : ServiceBase, IClientInfoService } } + var template = await FindTemplateAsync(INFO_CLIENT_TASK); + if (template == null) + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound)); + for (int i = 0; i < idModel.Ids.Length; i++) { var id = idModel.Ids[i]; diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs index b91c87b6..e126f044 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs @@ -344,13 +344,16 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction if (updateFlag) { - await SetTaskStatusAsync(new TaskUpdateRequest + result = await SetTaskStatusAsync(new TaskUpdateRequest { BusinessId = request.BusinessId, BusinessType = request.BusinessType, TaskTypeName = request.TaskTypeName, TaskStatus = TaskStatusEnum.Create }, false); + + if (!result.Succeeded) + return result; } } @@ -447,8 +450,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData)); if (task.TaskStatus == TaskStatusEnum.Complete) return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskCompleted)); - if (task.TaskStatus == TaskStatusEnum.Cancel) - return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskCancelled)); + //if (task.TaskStatus == TaskStatusEnum.Cancel) + // return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskCancelled)); var result = await ManagerService.SetTaskStatusWithBsno(request.BusinessId, request.TaskType, request.TaskStatus, DateTime.Now); if (!result.Succeeded) From 0dbc57ca25f1f0364a322e5fb1158430477845ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Wed, 11 Sep 2024 14:36:20 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Flow/Method/FlowInstanceService.cs | 2 ++ .../DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs index 1ac60d30..3f2bca85 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs @@ -1,4 +1,5 @@ using DS.Module.Core; +using DS.Module.Core.Data; using DS.Module.Core.Extensions; using DS.WMS.Core.Flow.Dtos; using DS.WMS.Core.Flow.Entity; @@ -28,6 +29,7 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService /// public FlowInstanceService(IServiceProvider serviceProvider) : base(serviceProvider) { + Db.QueryFilter.Clear(); } /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs index e126f044..b28241b5 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs @@ -464,10 +464,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction task.RejectReason = request.RejectReason; //更新当å‰ä»»åŠ¡çŠ¶æ€ task.TaskStatus = request.TaskStatus; - if (AuditTaskTypes.Contains(task.TaskType)) - task.FlowId = null; - - await TenantDb.Updateable(task).UpdateColumns(x => new { x.TaskStatus, x.FlowId, x.RejectReason }).ExecuteCommandAsync(); + await TenantDb.Updateable(task).UpdateColumns(x => new { x.TaskStatus, x.RejectReason }).ExecuteCommandAsync(); if (task.TaskStatus == TaskStatusEnum.Complete && task.NextType.HasValue && request.AutoCreateNext) { From ffa903e8788dea8e37fe16fea0b10d9970cec0b2 Mon Sep 17 00:00:00 2001 From: dengyu Date: Wed, 11 Sep 2024 16:17:55 +0800 Subject: [PATCH 4/4] 20240911 --- .../Controllers/CM_BaseInfoController.cs | 12 ++++++++ .../Dtos/CM_DealExcelReq.cs | 28 +++++++++++++++++ .../Dtos/VW_CM_RentOut_NeedRentRes.cs | 4 +++ .../Dtos/VW_CM_SellCtn_NeedSellRes.cs | 5 ++++ .../Interface/ICM_BaseInfoService.cs | 8 +++++ .../Method/CM_BaseInfoService.cs | 30 +++++++++++++++++++ .../Method/CM_CtnScrapService.cs | 2 +- .../Method/CM_RentInService.cs | 8 +++-- 8 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_DealExcelReq.cs diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/CM_BaseInfoController.cs b/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/CM_BaseInfoController.cs index 4e947d88..356b55a8 100644 --- a/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/CM_BaseInfoController.cs +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/CM_BaseInfoController.cs @@ -78,4 +78,16 @@ public class CM_BaseInfoController : ApiController return res; } + + /// + /// 处ç†é™„件 + /// + /// + [HttpPost] + [Route("CM_DealExcel")] + public DataResult CM_DealExcel([FromBody] CM_DealExcelReq model) + { + var res = _invokeService.CM_DealExcel(model); + return res; + } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_DealExcelReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_DealExcelReq.cs new file mode 100644 index 00000000..89bea12a --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_DealExcelReq.cs @@ -0,0 +1,28 @@ +using DS.Module.Core; +using DS.Module.Core.Enums; +using DS.WMS.ContainerManagement.Info.Entity; +using FluentValidation; +using Mapster; +using Masuit.Tools.Systems; +using SqlSugar; + +namespace DS.WMS.ContainerManagement.Info.Dtos; + +/// +/// 箱管_处ç†é™„件 +/// +public class CM_DealExcelReq +{ + /// + /// ä¸»é”®ç¼–å· + /// + public long Id { get; set; } + + public string FormName { get; set; } + + public string TableName { get; set; } + + public long FileId { get; set; } + +} + diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/VW_CM_RentOut_NeedRentRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/VW_CM_RentOut_NeedRentRes.cs index 47c18a90..9571c1ce 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/VW_CM_RentOut_NeedRentRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/VW_CM_RentOut_NeedRentRes.cs @@ -118,4 +118,8 @@ public class VW_CM_RentOut_NeedRentRes /// public DateTime CreateTime { get; set; } + /// + /// Desc:å…³è”放箱å•å· + /// + public string? CtnReleaseNo { get; set; } } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/VW_CM_SellCtn_NeedSellRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/VW_CM_SellCtn_NeedSellRes.cs index bcaa37b7..a337972b 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/VW_CM_SellCtn_NeedSellRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/VW_CM_SellCtn_NeedSellRes.cs @@ -139,4 +139,9 @@ public class VW_CM_SellCtn_NeedSellRes /// public decimal? CtnValue_BuyingPrice { get; set; } + + /// + /// Desc:å…³è”放箱å•å· + /// + public string? CtnReleaseNo { get; set; } } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_BaseInfoService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_BaseInfoService.cs index 8e87b3fe..d7cc3492 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_BaseInfoService.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_BaseInfoService.cs @@ -38,4 +38,12 @@ public interface ICM_BaseInfoService /// /// DataResult CM_CheckCntrno(CM_CheckCntrno model); + + /// + /// 获å–详情 + /// + /// + /// + DataResult CM_DealExcel(CM_DealExcelReq model); + } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_BaseInfoService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_BaseInfoService.cs index e0888c2a..962f0b72 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_BaseInfoService.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_BaseInfoService.cs @@ -16,6 +16,7 @@ using DS.WMS.Core.Op.View; using DS.WMS.Core.Sys.Entity; using Mapster; using Microsoft.Extensions.DependencyInjection; +using Newtonsoft.Json; using SqlSugar; namespace DS.WMS.ContainerManagement.Info.Method; @@ -254,4 +255,33 @@ public class CM_BaseInfoService : ICM_BaseInfoService return true; } + + + /// + /// 处ç†é™„件 + /// + /// + /// + public DataResult CM_DealExcel(CM_DealExcelReq req) + { + return DataResult.Successed($"调用æˆåŠŸ!{JsonConvert.SerializeObject(req)}", MultiLanguageConst.DataUpdateSuccess); + + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + + + } + + /// + /// 处ç†é™„件 + /// + /// + /// + public DataResult CM_CheckCtnBase(CM_DealExcelReq req) + { + return DataResult.Successed($"", MultiLanguageConst.DataUpdateSuccess); + + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + + + } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_CtnScrapService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_CtnScrapService.cs index 0804c969..8332e20d 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_CtnScrapService.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_CtnScrapService.cs @@ -542,7 +542,7 @@ public class CM_CtnScrapService : CMServiceBase, ICM_CtnScrapService /// - /// 租箱租入明细视图_列表 + /// 报废箱 å¾…å–列表 /// /// /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_RentInService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_RentInService.cs index 7a1afa85..638c6aa7 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_RentInService.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_RentInService.cs @@ -421,8 +421,12 @@ public class CM_RentInService : CMServiceBase, ICM_RentInService //如果没有填写æ箱日期 则å˜åŠ¨æ¥æºidè®¾ä¸ºç§Ÿç®±ä¸»å• å˜åŠ¨æ—¥æœŸè®¾ä¸ºä¸šåŠ¡æ—¥æœŸ //如果填写了æ箱日期 则å˜åŠ¨æ¥æºidè®¾ä¸ºç§Ÿç®±ä¸»å• å˜åŠ¨æ—¥æœŸè®¾ä¸ºæ箱日期 - if (detail.PickupDate != null) + //20240911 改为通过明细中的æ箱日期 或 开始计费日期(如果两者皆有,则优先使用æ箱日期)æ¥ç¡®å®šå˜åŠ¨æ—¥æœŸ + + if (detail.PickupDate != null|| detail.FeeStartDate != null) { + var changedate = detail.PickupDate==null?detail.FeeStartDate:detail.PickupDate; + changerec.CtnStateId = CMCtnStateEnum.AV; changerec.ChangeSourceDetailId = detail.Id; changerec.CtnFlowStateId = CMCtnFlowStateEnum.å·²æç®±; @@ -786,7 +790,7 @@ public class CM_RentInService : CMServiceBase, ICM_RentInService /// - /// 租箱租入明细视图_列表 + /// 租箱租入 退租待å–用明细视图_列表 /// /// ///