diff --git a/ds-wms-service/DS.Module.Core/Constants/SqlSugarCacheConst.cs b/ds-wms-service/DS.Module.Core/Constants/SqlSugarCacheConst.cs index 893cd71b..9343cbf6 100644 --- a/ds-wms-service/DS.Module.Core/Constants/SqlSugarCacheConst.cs +++ b/ds-wms-service/DS.Module.Core/Constants/SqlSugarCacheConst.cs @@ -36,6 +36,11 @@ namespace DS.Module.Core.Constants /// public const string Package = "sys_sqlSugar:Package"; + /// + /// SqlSugar二级缓存 集装箱信息 + /// + public const string Ctn = "sys_sqlSugar:Ctn"; + /// /// SqlSugar二级缓存 船名信息 /// diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeCtnService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeCtnService.cs index bbf7ae0e..968c650d 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeCtnService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeCtnService.cs @@ -1,4 +1,5 @@ using DS.Module.Core; +using DS.Module.Core.Constants; using DS.Module.Core.Data; using DS.Module.Core.Extensions; using DS.Module.SqlSugar; @@ -109,7 +110,7 @@ public class CodeCtnService:ICodeCtnService var data = req.Adapt(); - var entity = tenantDb.Insertable(data).ExecuteReturnEntity(); + var entity = tenantDb.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.Ctn}{user.TenantId}").ExecuteReturnEntity(); _sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodeCtn, "DS8").GetAwaiter().GetResult(); return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); } @@ -119,7 +120,7 @@ public class CodeCtnService:ICodeCtnService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).RemoveDataCache($"{SqlSugarCacheConst.Ctn}{user.TenantId}").IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); _sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodeCtn, "DS8").GetAwaiter().GetResult(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } @@ -187,7 +188,7 @@ public class CodeCtnService:ICodeCtnService var list = tenantDb.Queryable().Where(x => req.Ids.Contains(x.Id)).ToList(); if (list.Count > 0) { - tenantDb.Deleteable(list).ExecuteCommand(); + tenantDb.Deleteable(list).RemoveDataCache($"{SqlSugarCacheConst.Ctn}{user.TenantId}").ExecuteCommand(); } _sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodeCtn, "DS8").GetAwaiter().GetResult(); return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess); diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportCommonService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportCommonService.cs index 37fb8b7f..0657d1ef 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportCommonService.cs @@ -264,7 +264,7 @@ namespace DS.WMS.Core.Op.Method } else { - return DataResult.Failed("非法结算方式!"); + return DataResult.Failed("该委托单位未设置账期类型!"); }