diff --git a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs index 734c5390..7d53df9f 100644 --- a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs +++ b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs @@ -521,9 +521,9 @@ public static class MultiLanguageConst [Description("海运出口信息分提单号已存在")] public const string SeaExportHBLNOExist = "Sea_Export_HBLNO_Exist"; - [Description("截港日期不允许小于开船日期")] + [Description("截港日期不允许大于开船日期")] public const string SeaExportCloseDateLimit = "Sea_Export_CloseDate_Limit"; - [Description("截单日期不允许小于开船日期")] + [Description("截单日期不允许大于开船日期")] public const string SeaExportCloseDocDateLimit = "Sea_Export_CloseDocDate_Limit"; [Description("箱信息不存在")] diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs index 171878c9..d1e31ca8 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs @@ -437,11 +437,11 @@ public partial class SeaExportService : ISeaExportService //TODO 会计期间不允许小于已结转期间 if (req.CloseDocDate.IsNotNull() && req.ETD.IsNotNull() && req.CloseDocDate > req.ETD) { - return await Task.FromResult(DataResult.Failed("截单日期不允许小于开船日期!", MultiLanguageConst.SeaExportCloseDocDateLimit)); + return await Task.FromResult(DataResult.Failed("截单日期不允许大于开船日期!", MultiLanguageConst.SeaExportCloseDocDateLimit)); } if (req.ClosingDate.IsNotNull() && req.ETD.IsNotNull() && req.ClosingDate > req.ETD) { - return await Task.FromResult(DataResult.Failed("截港日期不允许小于开船日期!", MultiLanguageConst.SeaExportCloseDateLimit)); + return await Task.FromResult(DataResult.Failed("截港日期不允许大于开船日期!", MultiLanguageConst.SeaExportCloseDateLimit)); } var sequence = commonService.GetSequenceNext(); if (!sequence.Succeeded) @@ -522,13 +522,13 @@ public partial class SeaExportService : ISeaExportService } info = req.Adapt(info); //TODO 会计期间不允许小于已结转期间 - if (info.CloseDocDate.IsNotNull() && info.CloseDocDate < info.ETD) + if (info.CloseDocDate.IsNotNull() && info.CloseDocDate > info.ETD) { - return await Task.FromResult(DataResult.Failed("截单日期不允许小于开船日期!", MultiLanguageConst.SeaExportCloseDocDateLimit)); + return await Task.FromResult(DataResult.Failed("截单日期不允许大于开船日期!", MultiLanguageConst.SeaExportCloseDocDateLimit)); } - if (info.ClosingDate.IsNotNull() && info.ClosingDate < info.ETD) + if (info.ClosingDate.IsNotNull() && info.ClosingDate > info.ETD) { - return await Task.FromResult(DataResult.Failed("截港日期不允许小于开船日期!", MultiLanguageConst.SeaExportCloseDateLimit)); + return await Task.FromResult(DataResult.Failed("截港日期不允许大于开船日期!", MultiLanguageConst.SeaExportCloseDateLimit)); } #region 处理箱型箱量 if (req.CtnInfo.Count > 0) diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/SysRoleService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/SysRoleService.cs index 3ed99716..ea9cf753 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/SysRoleService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/SysRoleService.cs @@ -218,25 +218,25 @@ public class SysRoleService : ISysRoleService IEnumerable delPermissions = existPermissions.AsQueryable().Except(model.PermissionIds); if (delPermissions.Count() > 0) { - db.Updateable() - .SetColumns(it => it.IsPermission == 0)//SetColumns是可以叠加的 写2个就2个字段赋值 + db.Deleteable() + //.SetColumns(it => it.IsPermission == 0)//SetColumns是可以叠加的 写2个就2个字段赋值 .Where(it => it.RoleId == model.RoleId && delPermissions.Contains(it.PermissionId)) .ExecuteCommand(); } IEnumerable addPermissions = model.PermissionIds.AsQueryable().Except(existPermissions); if (addPermissions.Count() > 0) { - var existNoPermissions = db.Queryable().Where(x => x.RoleId == model.RoleId && x.IsPermission == 0).Select(n => n.PermissionId).ToArray(); - IEnumerable updatePermissions = existNoPermissions.AsQueryable().Except(addPermissions); - if (updatePermissions.Count() > 0) - { - db.Updateable() - .SetColumns(it => it.IsPermission == 1) - .Where(it => it.RoleId == model.RoleId && updatePermissions.Contains(it.PermissionId)) - .ExecuteCommand(); - } - IEnumerable addRolePermissions = addPermissions.AsQueryable().Except(existNoPermissions); - foreach (var item in addRolePermissions) + //var existNoPermissions = db.Queryable().Where(x => x.RoleId == model.RoleId && x.IsPermission == 0).Select(n => n.PermissionId).ToArray(); + //IEnumerable updatePermissions = existNoPermissions.AsQueryable().Except(addPermissions); + //if (updatePermissions.Count() > 0) + //{ + // db.Updateable() + // .SetColumns(it => it.IsPermission == 1) + // .Where(it => it.RoleId == model.RoleId && updatePermissions.Contains(it.PermissionId)) + // .ExecuteCommand(); + //} + //IEnumerable addRolePermissions = addPermissions.AsQueryable().Except(existNoPermissions); + foreach (var item in addPermissions) { var permission = new SysRolePermission { @@ -258,29 +258,29 @@ public class SysRoleService : ISysRoleService IEnumerable delPermissions = existPermissions.AsQueryable().Except(model.PermissionIds); if (delPermissions.Count() > 0) { - db.Updateable() - .SetColumns(it => it.IsPermission == 0)//SetColumns是可以叠加的 写2个就2个字段赋值 - .Where(it => it.RoleId == model.RoleId && delPermissions.Contains(it.PermissionId)) - .ExecuteCommand(); + db.Deleteable() + //.SetColumns(it => it.IsPermission == 0)//SetColumns是可以叠加的 写2个就2个字段赋值 + .Where(it => it.RoleId == model.RoleId && delPermissions.Contains(it.PermissionId)) + .ExecuteCommand(); } IEnumerable addPermissions = model.PermissionIds.AsQueryable().Except(existPermissions); if (addPermissions.Count() > 0) { - var existNoPermissions = db.Queryable().Where(x => x.RoleId == model.RoleId && x.IsPermission == 0).Select(n => n.PermissionId).ToArray(); - IEnumerable updatePermissions = existNoPermissions.AsQueryable().Except(addPermissions); - if (updatePermissions.Count() > 0) - { - db.Updateable() - .SetColumns(it => it.IsPermission == 1) - .Where(it => it.RoleId == model.RoleId && updatePermissions.Contains(it.PermissionId)) - .ExecuteCommand(); - } - IEnumerable addRolePermissions = addPermissions.AsQueryable().Except(existNoPermissions); + //var existNoPermissions = db.Queryable().Where(x => x.RoleId == model.RoleId && x.IsPermission == 0).Select(n => n.PermissionId).ToArray(); + //IEnumerable updatePermissions = existNoPermissions.AsQueryable().Except(addPermissions); + //if (updatePermissions.Count() > 0) + //{ + // db.Updateable() + // .SetColumns(it => it.IsPermission == 1) + // .Where(it => it.RoleId == model.RoleId && updatePermissions.Contains(it.PermissionId)) + // .ExecuteCommand(); + //} + //IEnumerable addRolePermissions = addPermissions.AsQueryable().Except(existNoPermissions); #region 租户模块权限检测 var tenant = db.Queryable().Where(x => x.Id == long.Parse(user.TenantId)).First(); - foreach (var item in addRolePermissions) + foreach (var item in addPermissions) { var per = db.Queryable().Where(x => x.Id == item) .First(); @@ -322,7 +322,7 @@ public class SysRoleService : ISysRoleService #endregion - foreach (var item in addRolePermissions) + foreach (var item in addPermissions) { var permission = new SysRolePermission { 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..99e0fcb6 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:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml MvcControllerEmptyScaffolder root/Common/MVC/Controller