jianghaiqing 4 months ago
commit ae09433e3c

@ -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("箱信息不存在")]

@ -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<SeaExport>();
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)

@ -218,25 +218,25 @@ public class SysRoleService : ISysRoleService
IEnumerable<long?> delPermissions = existPermissions.AsQueryable().Except(model.PermissionIds);
if (delPermissions.Count() > 0)
{
db.Updateable<SysRolePermission>()
.SetColumns(it => it.IsPermission == 0)//SetColumns是可以叠加的 写2个就2个字段赋值
db.Deleteable<SysRolePermission>()
//.SetColumns(it => it.IsPermission == 0)//SetColumns是可以叠加的 写2个就2个字段赋值
.Where(it => it.RoleId == model.RoleId && delPermissions.Contains(it.PermissionId))
.ExecuteCommand();
}
IEnumerable<long?> addPermissions = model.PermissionIds.AsQueryable().Except(existPermissions);
if (addPermissions.Count() > 0)
{
var existNoPermissions = db.Queryable<SysRolePermission>().Where(x => x.RoleId == model.RoleId && x.IsPermission == 0).Select(n => n.PermissionId).ToArray();
IEnumerable<long?> updatePermissions = existNoPermissions.AsQueryable().Except(addPermissions);
if (updatePermissions.Count() > 0)
{
db.Updateable<SysRolePermission>()
.SetColumns(it => it.IsPermission == 1)
.Where(it => it.RoleId == model.RoleId && updatePermissions.Contains(it.PermissionId))
.ExecuteCommand();
}
IEnumerable<long?> addRolePermissions = addPermissions.AsQueryable().Except(existNoPermissions);
foreach (var item in addRolePermissions)
//var existNoPermissions = db.Queryable<SysRolePermission>().Where(x => x.RoleId == model.RoleId && x.IsPermission == 0).Select(n => n.PermissionId).ToArray();
//IEnumerable<long?> updatePermissions = existNoPermissions.AsQueryable().Except(addPermissions);
//if (updatePermissions.Count() > 0)
//{
// db.Updateable<SysRolePermission>()
// .SetColumns(it => it.IsPermission == 1)
// .Where(it => it.RoleId == model.RoleId && updatePermissions.Contains(it.PermissionId))
// .ExecuteCommand();
//}
//IEnumerable<long?> addRolePermissions = addPermissions.AsQueryable().Except(existNoPermissions);
foreach (var item in addPermissions)
{
var permission = new SysRolePermission
{
@ -258,29 +258,29 @@ public class SysRoleService : ISysRoleService
IEnumerable<long?> delPermissions = existPermissions.AsQueryable().Except(model.PermissionIds);
if (delPermissions.Count() > 0)
{
db.Updateable<SysRolePermission>()
.SetColumns(it => it.IsPermission == 0)//SetColumns是可以叠加的 写2个就2个字段赋值
.Where(it => it.RoleId == model.RoleId && delPermissions.Contains(it.PermissionId))
.ExecuteCommand();
db.Deleteable<SysRolePermission>()
//.SetColumns(it => it.IsPermission == 0)//SetColumns是可以叠加的 写2个就2个字段赋值
.Where(it => it.RoleId == model.RoleId && delPermissions.Contains(it.PermissionId))
.ExecuteCommand();
}
IEnumerable<long?> addPermissions = model.PermissionIds.AsQueryable().Except(existPermissions);
if (addPermissions.Count() > 0)
{
var existNoPermissions = db.Queryable<SysRolePermission>().Where(x => x.RoleId == model.RoleId && x.IsPermission == 0).Select(n => n.PermissionId).ToArray();
IEnumerable<long?> updatePermissions = existNoPermissions.AsQueryable().Except(addPermissions);
if (updatePermissions.Count() > 0)
{
db.Updateable<SysRolePermission>()
.SetColumns(it => it.IsPermission == 1)
.Where(it => it.RoleId == model.RoleId && updatePermissions.Contains(it.PermissionId))
.ExecuteCommand();
}
IEnumerable<long?> addRolePermissions = addPermissions.AsQueryable().Except(existNoPermissions);
//var existNoPermissions = db.Queryable<SysRolePermission>().Where(x => x.RoleId == model.RoleId && x.IsPermission == 0).Select(n => n.PermissionId).ToArray();
//IEnumerable<long?> updatePermissions = existNoPermissions.AsQueryable().Except(addPermissions);
//if (updatePermissions.Count() > 0)
//{
// db.Updateable<SysRolePermission>()
// .SetColumns(it => it.IsPermission == 1)
// .Where(it => it.RoleId == model.RoleId && updatePermissions.Contains(it.PermissionId))
// .ExecuteCommand();
//}
//IEnumerable<long?> addRolePermissions = addPermissions.AsQueryable().Except(existNoPermissions);
#region 租户模块权限检测
var tenant = db.Queryable<SysTenant>().Where(x => x.Id == long.Parse(user.TenantId)).First();
foreach (var item in addRolePermissions)
foreach (var item in addPermissions)
{
var per = db.Queryable<SysPermission>().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
{

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup>

Loading…
Cancel
Save