From cb2c73b2da18586795125c835edca7f404e79171 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Wed, 19 Jul 2023 11:45:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=98=E6=9B=B4=E6=8F=90=E5=8D=95?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingOrderService.cs | 28 +++---------------- .../Service/DataSync/DataSyncService.cs | 1 + .../DjyWebsiteAccountConfigService.cs | 21 ++++++++++++++ 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index efd4a586..ef849b8e 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -899,7 +899,7 @@ namespace Myshipping.Application } } await SaveLog(entity, mlist); - if (!string.IsNullOrEmpty(mlist.MBLNO) && entity.MBLNO != mlist.MBLNO) + if (!string.IsNullOrEmpty(entity.MBLNO) && entity.MBLNO != mlist.MBLNO) { //更改提单号 await UpdateMblno(entity); @@ -2068,7 +2068,7 @@ namespace Myshipping.Application throw Oops.Bah(html.Message); } - + } #endregion @@ -5279,8 +5279,8 @@ namespace Myshipping.Application throw Oops.Bah($"字典未配置 url_set->{CONST_TSL_EDI_URL} 请联系管理员"); //获取个人对应的账户,这里GetAccountConfig逻辑优先取个人,个人没有配置取公司对应配置 - userWebAccountConfig = GetAccountConfig(CONST_TSL_TYPE_CODE, UserManager.UserId, UserManager.TENANT_ID).GetAwaiter() - .GetResult(); + userWebAccountConfig = await _webAccountConfig.GetAccountConfig(CONST_TSL_TYPE_CODE, UserManager.UserId); + _logger.LogInformation("批次={no} 获取获取网站的账户完成,result={Num}", batchNo, JSON.Serialize(userWebAccountConfig)); @@ -6046,27 +6046,7 @@ namespace Myshipping.Application } #endregion - /// - /// 获取个人或公司网站账户配置 - /// - /// 账户类型代码 - /// 用户ID - /// 租户ID - /// 返回账户配置 - private async Task GetAccountConfig(string typeCode, long userId, long tendId) - { - DjyWebsiteAccountConfig accountConfig = new DjyWebsiteAccountConfig(); - accountConfig = await _djyWebsiteAccountConfigRepository.EntityContext.CopyNew().Queryable() - .FirstAsync(x => x.TypeCode == typeCode && x.CreatedUserId == userId); - - if (accountConfig == null) - { - accountConfig = await _djyWebsiteAccountConfigRepository.EntityContext.CopyNew().Queryable() - .FirstAsync(x => x.TypeCode == typeCode && x.TenantId == tendId && x.IsTenant == true); - } - return accountConfig; - } #region 下载订舱、截单EDI /// diff --git a/Myshipping.Application/Service/DataSync/DataSyncService.cs b/Myshipping.Application/Service/DataSync/DataSyncService.cs index 3a3b165c..be5604fb 100644 --- a/Myshipping.Application/Service/DataSync/DataSyncService.cs +++ b/Myshipping.Application/Service/DataSync/DataSyncService.cs @@ -2393,6 +2393,7 @@ namespace Myshipping.Application } + #endregion #region 其他 diff --git a/Myshipping.Core/Service/DjyWebsiteAccountConfig/DjyWebsiteAccountConfigService.cs b/Myshipping.Core/Service/DjyWebsiteAccountConfig/DjyWebsiteAccountConfigService.cs index 4d5c1275..e17d6f27 100644 --- a/Myshipping.Core/Service/DjyWebsiteAccountConfig/DjyWebsiteAccountConfigService.cs +++ b/Myshipping.Core/Service/DjyWebsiteAccountConfig/DjyWebsiteAccountConfigService.cs @@ -192,6 +192,27 @@ namespace Myshipping.Core.Service } return accountConfig; } + ///// + ///// 获取个人或公司网站账户配置 + ///// + ///// 账户类型代码 + ///// 用户ID + ///// 租户ID + ///// 返回账户配置 + //private async Task GetAccountConfig(string typeCode, long userId, long tendId) + //{ + // DjyWebsiteAccountConfig accountConfig = new DjyWebsiteAccountConfig(); + // accountConfig = await _djyWebsiteAccountConfigRepository.EntityContext.CopyNew().Queryable() + // .FirstAsync(x => x.TypeCode == typeCode && x.CreatedUserId == userId); + + // if (accountConfig == null) + // { + // accountConfig = await _djyWebsiteAccountConfigRepository.EntityContext.CopyNew().Queryable() + // .FirstAsync(x => x.TypeCode == typeCode && x.TenantId == tendId && x.IsTenant == true); + // } + + // return accountConfig; + //} #endregion } } From a4c92ef4b547766fedf109d4584d14fbe79acfb0 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Wed, 19 Jul 2023 13:40:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B4=BE=E8=BD=A6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=8F=B0=E8=B4=A6=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaskManagePlat/TaskManageTruckService.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs index 45c2c882..9fe7900e 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs @@ -1408,6 +1408,24 @@ namespace Myshipping.Application it.UpdatedUserName }).ExecuteCommandAsync(); + var taskInfo = _taskBaseRepository.AsQueryable().First(a => a.PK_ID == entity.TASK_ID); + + if (taskInfo != null) + { + taskInfo.TRUCK_NAME = entity.TruckName; + taskInfo.UpdatedTime = entity.UpdatedTime; + taskInfo.UpdatedUserId = UserManager.UserId; + taskInfo.UpdatedUserName = UserManager.Name; + + await _taskBaseRepository.AsUpdateable(taskInfo).UpdateColumns(it => new + { + it.TRUCK_NAME, + it.UpdatedTime, + it.UpdatedUserId, + it.UpdatedUserName + }).ExecuteCommandAsync(); + } + result.succ = true; result.msg = "保存成功";