From ce9fb018621f251485fd8a8eebae4acd15940cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Fri, 13 Sep 2024 14:28:49 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=B7=A5=E4=BD=9CGetNextConditionNodeId?= =?UTF-8?q?=E6=96=B9=E6=B3=95bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Constants/MultiLanguageConst.cs | 4 + .../DS.WMS.Core/Fee/Method/FeeAuditService.cs | 4 +- .../DS.WMS.Core/Flow/Method/FlowRuntime.cs | 177 +++++------------- .../DS.WMS.Core/Info/Dtos/ClientInfoRes.cs | 2 +- .../Info/Interface/IClientInfoService.cs | 6 +- .../Info/Method/ClientInfoService.cs | 14 +- .../Op/Method/TaskInteraction/TaskService.cs | 9 +- .../Controllers/ClientInfoController.cs | 7 +- 8 files changed, 69 insertions(+), 154 deletions(-) diff --git a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs index 0efe9b9f..54aa4c35 100644 --- a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs +++ b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs @@ -1505,10 +1505,14 @@ public static class MultiLanguageConst #region 关联任务 [Description("此任务已存在,请勿重复提交")] public const string TaskExists = "Task_Exists"; + [Description("未能找到任务")] + public const string TaskNotExists = "Task_Not_Exists"; [Description("此任务已完成")] public const string TaskCompleted = "Task_Completed"; [Description("此任务已取消")] public const string TaskCancelled = "Task_Cancelled"; + [Description("任务数据与已提交数据条数不匹配")] + public const string TaskCountNotMatch = "Task_Count_Not_Match"; [Description("当前任务状态不支持此操作")] public const string TaskStatusNotSupported = "Task_Status_Not_Supported"; [Description("当前任务状态不正确,无法提交审核")] diff --git a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeAuditService.cs b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeAuditService.cs index 2a4c5f82..601d3bd7 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeAuditService.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeAuditService.cs @@ -563,7 +563,7 @@ namespace DS.WMS.Core.Fee.Method }); if (!result.Succeeded) - list.AddRange(fees.Where(x => ids.Contains(x.Id)).Select(x => x.FeeName)); + list.Add(result.Message); } else { @@ -583,7 +583,7 @@ namespace DS.WMS.Core.Fee.Method } if (list.Count > 0) - return DataResult.Failed($"{MultiLanguageConst.Operation_Failed}:{string.Join("、", list)}"); + return DataResult.Failed(string.Join("、", list)); } return DataResult.Success; diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowRuntime.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowRuntime.cs index a85c398a..ff5d0809 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowRuntime.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowRuntime.cs @@ -209,8 +209,6 @@ public class FlowRuntime { return ChildNodes.Where(x => x.Id == "end").First().Id; } - - // return ChildNodes.Where(x => x.Pid == nodeId).First().Id; } } @@ -233,155 +231,66 @@ public class FlowRuntime } else { - var conditions = conditionNodes[i].Conditions; - var conditionalCollections = new List(); - if (conditions.LogicalOperator == "and") - { - var conditionList = new List>(); - foreach (var item in conditions.Conditions) - { - conditionList.Add(new KeyValuePair - (WhereType.And, - new ConditionalModel - { - FieldName = item.Field, - ConditionalType = GetConditionalType(item.Operator), - FieldValue = item.Value - }) - ); - } + var nodeSection = conditionNodes[i].Conditions; + var list = new List(); + var conditionList = new List>(nodeSection.Conditions.Count); - if (conditionList.Count > 0) - { - conditionalCollections.Add(new ConditionalCollections - { - ConditionalList = conditionList - } - ) - ; - } - - var groupList = new List>(); - foreach (var group in conditions.Groups) - { - if (group.LogicalOperator == "and") - { - foreach (var item1 in group.Conditions) - { - groupList.Add(new KeyValuePair - (WhereType.And, - new ConditionalModel - { - FieldName = item1.Field, - ConditionalType = GetConditionalType(item1.Operator), - FieldValue = item1.Value - }) - ); - } - } - else - { - foreach (var item1 in group.Conditions) + var whereType = Enum.Parse(nodeSection.LogicalOperator, true); + foreach (var item in nodeSection.Conditions) + { + conditionList.Add(new KeyValuePair + (whereType, + new ConditionalModel { - groupList.Add(new KeyValuePair - (WhereType.Or, - new ConditionalModel - { - FieldName = item1.Field, - ConditionalType = GetConditionalType(item1.Operator), - FieldValue = item1.Value - }) - ); - } - } - } + FieldName = item.Field, + ConditionalType = GetConditionalType(item.Operator), + FieldValue = item.Value + }) + ); + } - if (groupList.Count > 0) + if (conditionList.Count > 0) + { + list.Add(new ConditionalCollections { - conditionalCollections.Add(new ConditionalCollections - { - ConditionalList = groupList - } - ) - ; - } + ConditionalList = conditionList + }); } - else + + var groupList = new List>(); + foreach (var group in nodeSection.Groups) { - var conditionList = new List>(); - foreach (var item in conditions.Conditions) + WhereType whereType2 = Enum.Parse(group.LogicalOperator, true); + for (int j = 0; j < group.Conditions.Count; j++) { - conditionList.Add(new KeyValuePair - (WhereType.Or, + var item1 = group.Conditions[j]; + groupList.Add(new KeyValuePair + (j == 0 ? whereType : whereType2, new ConditionalModel { - FieldName = item.Field, - ConditionalType = GetConditionalType(item.Operator), - FieldValue = item.Value + FieldName = item1.Field, + ConditionalType = GetConditionalType(item1.Operator), + FieldValue = item1.Value }) ); } + } - if (conditionList.Count > 0) - { - conditionalCollections.Add(new ConditionalCollections - { - ConditionalList = conditionList - } - ) - ; - } - - var groupList = new List>(); - foreach (var group in conditions.Groups) - { - if (group.LogicalOperator == "and") - { - foreach (var item1 in group.Conditions) - { - groupList.Add(new KeyValuePair - (WhereType.And, - new ConditionalModel - { - FieldName = item1.Field, - ConditionalType = GetConditionalType(item1.Operator), - FieldValue = item1.Value - }) - ); - } - } - else - { - foreach (var item1 in group.Conditions) - { - groupList.Add(new KeyValuePair - (WhereType.Or, - new ConditionalModel - { - FieldName = item1.Field, - ConditionalType = GetConditionalType(item1.Operator), - FieldValue = item1.Value - }) - ); - } - } - } - - if (groupList.Count > 0) + if (groupList.Count > 0) + { + list.Add(new ConditionalCollections { - conditionalCollections.Add(new ConditionalCollections - { - ConditionalList = groupList - } - ) - ; - } + ConditionalList = groupList + }); } - var conditionalModels = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(JsonConvert.SerializeObject(conditionalCollections)); - if (conditionalModels.Count == 0) //跳过默认条件 + if (list.Count == 0) //跳过默认条件 continue; + //string json = JsonConvert.SerializeObject(list); + //db.Utilities.JsonToConditionalModels(json); + List conditionalModels = [.. list]; + ISqlSugarClient sugarClient = tenantDb ?? db; var exists = sugarClient.Queryable().AS(ColumnView).Where("Id=@Id", new { Id = BusinessId }).Where(conditionalModels).Any(); if (exists) @@ -414,7 +323,7 @@ public class FlowRuntime return ChildNodes.Where(x => x.Id == childId).First(); //下一个节点 } //todo:前端组织JSON结构有误,加入临时修复代码,待前端改正后移除 - else if (nextChild.Type == null) + else if (nextChild.Type == null) { nextChild.Id = nextChild.Type = FlowChild.END; nextChild.Name = "结束"; diff --git a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientInfoRes.cs b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientInfoRes.cs index c21625c1..07b3d9f2 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientInfoRes.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientInfoRes.cs @@ -197,7 +197,7 @@ public class ClientInfoRes /// /// 审批意见 /// - public string AuditNote { get; set; } + public string? AuditNote { get; set; } /// /// Desc:默认付费方式 diff --git a/ds-wms-service/DS.WMS.Core/Info/Interface/IClientInfoService.cs b/ds-wms-service/DS.WMS.Core/Info/Interface/IClientInfoService.cs index 118e5eda..4d0a404e 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Interface/IClientInfoService.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Interface/IClientInfoService.cs @@ -58,14 +58,14 @@ public interface IClientInfoService /// /// /// - Task EditClientInfoAsync(ClientInfoReq model); - + Task EditAsync(ClientInfoReq model); + /// /// 获取详情 /// /// /// - DataResult GetClientInfo(string id); + Task> GetAsync(string id); /// /// 批量删除发票抬头 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 4d900bc6..509178e6 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs @@ -357,7 +357,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService /// /// /// - public async Task EditClientInfoAsync(ClientInfoReq req) + public async Task EditAsync(ClientInfoReq req) { var data = req.Adapt(); data.Status = (int)StatusEnum.Disable; @@ -417,22 +417,22 @@ public class ClientInfoService : ServiceBase, IClientInfoService /// /// /// - public DataResult GetClientInfo(string id) + public async Task> GetAsync(string id) { - var entity = TenantDb.Queryable() + var entity = await TenantDb.Queryable() .Where(a => a.Id == long.Parse(id)) - .First(); + .FirstAsync(); if (entity == null) return DataResult.Success(null); var data = entity.Adapt(); data.ServiceItemCodes = entity.ServiceItem?.Split(',', StringSplitOptions.RemoveEmptyEntries); - var tag = TenantDb.Queryable().Select() - .First(a => a.ClientId == long.Parse(id)); + var tag = await TenantDb.Queryable().Select() + .FirstAsync(a => a.ClientId == long.Parse(id)); data.ClientTag = tag; - data.InvoiceHeaders ??= TenantDb.Queryable().Where(x => x.RelativeId == data.Id).ToList(); + data.InvoiceHeaders ??= await TenantDb.Queryable().Where(x => x.RelativeId == data.Id).ToListAsync(); return DataResult.Success(data, MultiLanguageConst.DataQuerySuccess); } 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 a50c4daa..c7757341 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 @@ -163,8 +163,9 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction if (strList.Count == 0) return DataResult.Success; - - return DataResult.Failed(string.Format(MultiLanguageConst.OrderTaskSubmitted, string.Join("、", strList))); + + return DataResult.Failed(string.Format( + MultiLanguageConst.GetDescription(MultiLanguageConst.OrderTaskSubmitted), string.Join("、", strList))); } /// @@ -737,7 +738,9 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction var tasks = await TenantDb.Queryable().Where(x => x.TaskType == request.TaskType && request.Ids.Contains(x.BusinessId)) .WhereIF(request.BusinessType.HasValue, x => x.BusinessType == request.BusinessType.Value).ToListAsync(); if (tasks.Count == 0) - return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData)); + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskNotExists)); + if (tasks.Count != request.Ids.Length) + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskCountNotMatch)); if (tasks.Exists(x => x.TaskStatus == TaskStatusEnum.Complete)) { diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/ClientInfoController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/ClientInfoController.cs index c81d34a0..909c705d 100644 --- a/ds-wms-service/DS.WMS.MainApi/Controllers/ClientInfoController.cs +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/ClientInfoController.cs @@ -110,7 +110,7 @@ public class ClientInfoController : ApiController [HttpPost, Route("EditClientInfo")] public async Task EditClientInfoAsync([FromBody] ClientInfoReq req) { - var res = await _invokeService.EditClientInfoAsync(req); + var res = await _invokeService.EditAsync(req); return res; } @@ -121,10 +121,9 @@ public class ClientInfoController : ApiController /// [HttpGet] [Route("GetClientInfo")] - public DataResult GetClientInfo([FromQuery] string id) + public async Task> GetClientInfoAsync([FromQuery] string id) { - var res = _invokeService.GetClientInfo(id); - return res; + return await _invokeService.GetAsync(id); } /// From 83613772c53ce443bcb5b912e4b35fabd79d0327 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 13 Sep 2024 14:29:18 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9ONE=E7=9A=84YT=E6=88=AA?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Op/EDI/YTEdiHelper.cs | 43 +++++++++++++------ .../SeaExportBookingOrClosingEDIService.cs | 27 +++++++++--- .../DS.WMS.OpApi/DS.WMS.OpApi.csproj.user | 2 +- 3 files changed, 53 insertions(+), 19 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Op/EDI/YTEdiHelper.cs b/ds-wms-service/DS.WMS.Core/Op/EDI/YTEdiHelper.cs index f3a07dc7..d9e4ab3a 100644 --- a/ds-wms-service/DS.WMS.Core/Op/EDI/YTEdiHelper.cs +++ b/ds-wms-service/DS.WMS.Core/Op/EDI/YTEdiHelper.cs @@ -854,8 +854,9 @@ namespace DS.WMS.Core.Op.EDI r.WriteLine("03:" + ISSUETYPE + ":" + bill.ISSUEPLACEID.Trim() + ":" + bill.ISSUEPLACE.Trim() + ":" + GetDateStr(bill.ISSUEDATE, "yyyyMMdd") + ":" + GetBillNum2(bill.NOBILL) + ":" + bill.PREPARDAT + ":" + bill.PAYABLEAT + "'"); icount++; - - r.WriteLine("11:" + bill.VESSELID + ":" + bill.VESSEL + ":" + bill.VOYNO + ":::::" + GetDateStr(bill.ETD, "yyyyMMdd") + ":::::'"); + //2024-09-13 参考韩工东胜7去掉ETD + //r.WriteLine("11:" + bill.VESSELID + ":" + bill.VESSEL + ":" + bill.VOYNO + ":::::" + GetDateStr(bill.ETD, "yyyyMMdd") + ":::::'"); + r.WriteLine("11:" + bill.VESSELID + ":" + bill.VESSEL + ":" + bill.VOYNO + "::::::::::'"); icount++; var DESTINATIONID = bill.DESTINATIONID; @@ -917,7 +918,8 @@ namespace DS.WMS.Core.Op.EDI if (ShippingList.Count != 0 && Shipping.Length > 0) { - r.WriteLine("20::" + formatListStr(ShippingList, 6) + "'"); + //2024-09-13 韩工确认最大行数6改为9 + r.WriteLine("20::" + formatListStr(ShippingList, 9) + "'"); icount = icount + 1; } @@ -929,7 +931,8 @@ namespace DS.WMS.Core.Op.EDI if (ShippingList.Count != 0 && Shipping.Length > 0) { - r.WriteLine("21::" + formatListStr(ShippingList, 6) + "'"); + //2024-09-13 韩工确认最大行数6改为9 + r.WriteLine("21::" + formatListStr(ShippingList, 9) + "'"); icount = icount + 1; } @@ -940,7 +943,8 @@ namespace DS.WMS.Core.Op.EDI if (ShippingList.Count != 0 && Shipping.Length > 0) { - r.WriteLine("22::" + formatListStr(ShippingList, 6) + "'"); + //2024-09-13 韩工确认最大行数6改为9 + r.WriteLine("22::" + formatListStr(ShippingList, 9) + "'"); icount = icount + 1; } @@ -989,17 +993,23 @@ namespace DS.WMS.Core.Op.EDI if (kingweight == 0) kingweight = 100; - r.WriteLine("41:1:" + bill.HSCODE + ":" + cargoid + ":" + bill.PKGS.ToString() + ":" + bill.KINDPKGS_EDI_CODE + ":" + bill.KINDPKGS + ":" + kingweight.ToString("0.###") + ":" - + bill.CBM.ToString("0.###") + "::::::" + bill.KGS.ToString("0.###") + ":::'"); + r.WriteLine("41:1:" + bill.HSCODE + ":" + cargoid + ":" + bill.PKGS.ToString() + ":" + bill.KINDPKGS_EDI_CODE + ":" + bill.KINDPKGS + ":" + kingweight.ToString() + ":" + + bill.CBM.ToString() + "::::::" + bill.KGS.ToString() + ":::'"); icount = icount + 1; + if (cargoid == "R") + { r.WriteLine("43::::::::::" + bill.REEFERF + ":C:" + bill.TEMPSET + ":" + bill.TEMPMIN + ":" + bill.TEMPMAX + ":::::'"); + + icount = icount + 1; + } else if (cargoid == "D") + { r.WriteLine("43:" + bill.DCLASS + ":" + bill.DPAGE + ":" + bill.DUNNO + ":" + bill.DLABEL + "::::::::::::'"); - icount = icount + 1; - + icount = icount + 1; + } Shipping = formatEdiStr("txt", bill.MARKS); ShippingList = formatlengthStr(Shipping, 35); @@ -1131,7 +1141,7 @@ namespace DS.WMS.Core.Op.EDI if (InttrEdi.filetype == "E") { r.WriteLine("51:" + ctn.CNTRNO + ":" + ctn.CTNALLCODE + ":" - + ctn.SEALNO + ":" + ctn.PKGS.ToString() + ":" + ctn.KGS.ToString("0.###") + "::" + ctn.CBM.ToString("0.###") + ":" + bill.EDIATTNEMAIL + "'"); + + ctn.SEALNO + ":" + ctn.PKGS.ToString() + ":" + ctn.KGS.ToString() + "::" + ctn.CBM.ToString() + ":" + bill.EDIATTNEMAIL + "'"); icount = icount + 1; if (bill.CTNGOODSLIST != null && bill.CTNGOODSLIST.Count != 0) @@ -1139,7 +1149,7 @@ namespace DS.WMS.Core.Op.EDI foreach (var ctnhs in bill.CTNGOODSLIST) { r.WriteLine("53:" + ctnhs.HSCODE + ":" + ctnhs.PKGS.ToString() + ":" - + ctnhs.KGS.ToString("0.###") + ":" + ctnhs.CBM.ToString("0.###") + ":" + ctnhs.KINDPKGS_EDI_CODE + ":" + ctnhs.KINDPKGS + "'"); + + ctnhs.KGS.ToString() + ":" + ctnhs.CBM.ToString() + ":" + ctnhs.KINDPKGS_EDI_CODE + ":" + ctnhs.KINDPKGS + "'"); icount = icount + 1; Shipping = formatEdiStr("txt", ctnhs.DESCRIPTION); ShippingList = formatlengthStr(Shipping, 70); @@ -1183,13 +1193,20 @@ namespace DS.WMS.Core.Op.EDI } } + else + { + r.WriteLine("53:" + bill.HSCODE + ":" + ctn.PKGS.ToString() + ":" + + ctn.KGS.ToString() + ":" + ctn.CBM.ToString() + ":" + ctn.KINDPKGS_EDI_CODE + ":" + ctn.KINDPKGS + "'"); + + icount = icount + 1; + } } else { if (!string.IsNullOrEmpty(ctn.CNTRNO)) { r.WriteLine("51:" + ctn.CNTRNO + ":" + ctn.CTNALLCODE + ":" - + ctn.SEALNO + ":" + ctn.PKGS.ToString() + ":" + ctn.KGS.ToString("0.###") + ":'"); + + ctn.SEALNO + ":" + ctn.PKGS.ToString() + ":" + ctn.KGS.ToString() + ":'"); icount = icount + 1; } } @@ -1198,7 +1215,7 @@ namespace DS.WMS.Core.Op.EDI } - icount = icount + 1; + //icount = icount + 1; r.WriteLine("99:" + icount.ToString() + "'"); r.Close(); f.Close(); diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportBookingOrClosingEDIService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportBookingOrClosingEDIService.cs index a3641dda..e276a410 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportBookingOrClosingEDIService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportBookingOrClosingEDIService.cs @@ -1517,7 +1517,7 @@ namespace DS.WMS.Core.Op.Method primaryModel.EDIATTNEMAIL = ediExtModel.EDIAttnMail; - if (string.IsNullOrWhiteSpace(primaryModel.EDIATTNEMAIL) && ediRouteEnum != EDIRouteEnum.YT) + if (string.IsNullOrWhiteSpace(primaryModel.EDIATTNEMAIL)) { primaryModel.EDIATTNEMAIL = ftpSet.SendEmail; } @@ -1599,7 +1599,7 @@ namespace DS.WMS.Core.Op.Method //TODO 转换 var contaModel = conta.Adapt(); - var mapCtnRlt = GetCtnEDICode(conta.CtnCode, codeCtnList, mapCtnList, order.CarrierId, CONST_MAPPING_MODULE, conta.CtnAll); + var mapCtnRlt = GetCtnEDICode(conta.CtnCode, codeCtnList, mapCtnList, order.CarrierId, CONST_MAPPING_MODULE, conta.CtnAll, ediRouteEnum); if (mapCtnRlt.Succeeded) { @@ -2576,7 +2576,8 @@ namespace DS.WMS.Core.Op.Method /// 模块代码 /// 集装箱名称 /// - private DataResult GetCtnEDICode(string ctnCode, List codeCtnList, List mapCtnList, long carrierId, string moduleName, string ctnName) + private DataResult GetCtnEDICode(string ctnCode, List codeCtnList, List mapCtnList, long carrierId, string moduleName + , string ctnName, EDIRouteEnum ediRouteEnum) { CodeCtn codeCtnInfo = null; @@ -2612,9 +2613,25 @@ namespace DS.WMS.Core.Op.Method return DataResult.FailedData(edi); } - var mapCtnInfo = tenantDb.Queryable() - .First(a => a.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) && a.CarrierId == carrierId && a.LinkId == codeCtnInfo.Id); + MappingCtn mapCtnInfo = null; + + //如果是亿通需要读映射表,如果映射表没配置则提示错误 + if(ediRouteEnum == EDIRouteEnum.YT) + { + mapCtnInfo = tenantDb.Queryable() + .First(a => a.Module.Equals("BOOK_OR_CLOSING_YT", StringComparison.OrdinalIgnoreCase) && a.CarrierId == carrierId && a.LinkId == codeCtnInfo.Id); + if (mapCtnInfo == null) + { + throw new Exception($"集装箱型 {ctnName} 未配置订舱或截单EDT(亿通)的映射代码未找到"); + } + } + else + { + mapCtnInfo = tenantDb.Queryable() + .First(a => a.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) && a.CarrierId == carrierId && a.LinkId == codeCtnInfo.Id); + } + if (mapCtnInfo != null) { mapCtnList.Add(mapCtnInfo); diff --git a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user index 21e5222f..da141c5a 100644 --- a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user +++ b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user @@ -1,7 +1,7 @@  - D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml + E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml MvcControllerEmptyScaffolder root/Common/MVC/Controller From afb69390af50a98fc876a5b62d625722a2f69cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Fri, 13 Sep 2024 14:50:31 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs | 5 ++++- .../Properties/PublishProfiles/FolderProfile1.pubxml.user | 2 +- ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user | 2 +- 3 files changed, 6 insertions(+), 3 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 509178e6..135bceef 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs @@ -276,12 +276,13 @@ public class ClientInfoService : ServiceBase, IClientInfoService if (request.OtherQueryCondition?.ClientTag != null) { var props = Array.FindAll(request.OtherQueryCondition.ClientTag.GetType().GetProperties(), x => x.Name.StartsWith("Is") && x.PropertyType == typeof(bool)); + List list = []; foreach (var prop in props) { object val = prop.Get(request.OtherQueryCondition.ClientTag); if (val != null && val is bool value && value) { - whereList.Add(new ConditionalModel + list.Add(new ConditionalModel { ConditionalType = ConditionalType.Equal, FieldName = "ct." + prop.Name, @@ -289,6 +290,8 @@ public class ClientInfoService : ServiceBase, IClientInfoService }); } } + + query = query.Where(list); } var result = await query.Select((c, c1, c2, ct) => new ClientInfoRes 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 cc12734c..e0b095ab 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-09-13T02:44:56.1241214Z||;False|2024-09-13T10:44:26.6088271+08:00||;False|2024-09-13T10:44:06.1615137+08:00||;False|2024-09-13T10:43:19.2432517+08:00||;False|2024-09-13T10:38:18.1663387+08:00||;True|2024-09-06T18:49:17.9435308+08:00||;True|2024-09-06T17:01:39.6646353+08:00||;True|2024-09-06T10:27:36.9990456+08:00||;True|2024-09-06T09:48:23.4236094+08:00||;True|2024-09-05T13:57:23.8452431+08:00||;True|2024-09-05T10:21:34.6675149+08:00||;True|2024-09-05T09:12:44.5610882+08:00||;True|2024-09-04T10:07:38.3707398+08:00||;True|2024-09-04T09:52:47.0574599+08:00||;True|2024-09-03T16:41:23.7516960+08:00||;True|2024-09-03T15:22:31.8718097+08:00||;True|2024-09-03T10:01:09.7656702+08:00||;False|2024-09-03T09:46:46.8956531+08:00||;True|2024-09-02T17:07:41.0268500+08:00||;True|2024-09-02T13:50:22.0203254+08:00||;True|2024-09-02T13:34:23.3441546+08:00||;True|2024-08-30T11:25:14.7431645+08:00||;True|2024-08-29T16:38:26.3491372+08:00||;True|2024-08-29T16:32:31.8580864+08:00||;False|2024-08-29T16:30:41.4763198+08:00||;True|2024-08-09T09:18:05.8484398+08:00||;True|2024-08-09T08:45:38.7858906+08:00||;True|2024-08-05T11:37:07.3133020+08:00||;True|2024-07-24T16:45:58.2272340+08:00||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;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-09-13T06:31:12.4598160Z||;True|2024-09-13T10:44:56.1241214+08:00||;False|2024-09-13T10:44:26.6088271+08:00||;False|2024-09-13T10:44:06.1615137+08:00||;False|2024-09-13T10:43:19.2432517+08:00||;False|2024-09-13T10:38:18.1663387+08:00||;True|2024-09-06T18:49:17.9435308+08:00||;True|2024-09-06T17:01:39.6646353+08:00||;True|2024-09-06T10:27:36.9990456+08:00||;True|2024-09-06T09:48:23.4236094+08:00||;True|2024-09-05T13:57:23.8452431+08:00||;True|2024-09-05T10:21:34.6675149+08:00||;True|2024-09-05T09:12:44.5610882+08:00||;True|2024-09-04T10:07:38.3707398+08:00||;True|2024-09-04T09:52:47.0574599+08:00||;True|2024-09-03T16:41:23.7516960+08:00||;True|2024-09-03T15:22:31.8718097+08:00||;True|2024-09-03T10:01:09.7656702+08:00||;False|2024-09-03T09:46:46.8956531+08:00||;True|2024-09-02T17:07:41.0268500+08:00||;True|2024-09-02T13:50:22.0203254+08:00||;True|2024-09-02T13:34:23.3441546+08:00||;True|2024-08-30T11:25:14.7431645+08:00||;True|2024-08-29T16:38:26.3491372+08:00||;True|2024-08-29T16:32:31.8580864+08:00||;False|2024-08-29T16:30:41.4763198+08:00||;True|2024-08-09T09:18:05.8484398+08:00||;True|2024-08-09T08:45:38.7858906+08:00||;True|2024-08-05T11:37:07.3133020+08:00||;True|2024-07-24T16:45:58.2272340+08:00||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;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||; \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user index da141c5a..fb7be066 100644 --- a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user +++ b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user @@ -1,7 +1,7 @@  - E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml + D:\Source\Repos\DS8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml MvcControllerEmptyScaffolder root/Common/MVC/Controller From 42663775609ac8701278ad8be960796c588d1a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Fri, 13 Sep 2024 14:54:00 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=97=E8=A1=A8bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs | 1 + 1 file changed, 1 insertion(+) 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 135bceef..6a0eb122 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs @@ -275,6 +275,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService if (request.OtherQueryCondition?.ClientTag != null) { + //合并到主查询条件 var props = Array.FindAll(request.OtherQueryCondition.ClientTag.GetType().GetProperties(), x => x.Name.StartsWith("Is") && x.PropertyType == typeof(bool)); List list = []; foreach (var prop in props)