diff --git a/ds-wms-service/DS.WMS.Core/Sys/Entity/SysFieldSet.cs b/ds-wms-service/DS.WMS.Core/Sys/Entity/SysFieldSet.cs
index b2024bf4..2f36c291 100644
--- a/ds-wms-service/DS.WMS.Core/Sys/Entity/SysFieldSet.cs
+++ b/ds-wms-service/DS.WMS.Core/Sys/Entity/SysFieldSet.cs
@@ -32,6 +32,12 @@ public class SysFieldSet
///
/// 字段设置
///
- [SugarColumn(ColumnDescription = "字段设置", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)]
+ [SugarColumn(ColumnDescription = "字段设置", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string Content { get; set; }
+
+ ///
+ /// 租户Id
+ ///
+ [SugarColumn(ColumnDescription = "租户Id", IsNullable = true)]
+ public long? TenantId { get; set; }
}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs
index 2370b1b3..aee297a0 100644
--- a/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs
+++ b/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs
@@ -386,7 +386,7 @@ public class CommonService : ICommonService
{
return await Task.FromResult(DataResult.Failed("账号不存在或账号禁用,请检查!"));
}
-
+
if (userInfo.MD5Password != model.Password)
{
@@ -864,7 +864,7 @@ public class CommonService : ICommonService
#region 客户端通用
-
+
///
/// 获取权限树列表-客户端
///
@@ -1450,10 +1450,10 @@ public class CommonService : ICommonService
return db.Queryable(); //超级管理员特权
}
- var moduleName = typeof(T).Name.ToLower();
+ var moduleName = typeof(T).Name.ToLower();
var rule = tenantDb.Queryable()
- .First(u => u.UserId == long.Parse(user.UserId) && u.PermissionEntity.ToLower() == moduleName && u.Status == StatusEnum.Enable);
+ .First(u => u.UserId == long.Parse(user.UserId) && u.PermissionEntity.ToLower() == moduleName && u.Status == StatusEnum.Enable);
if (rule == null) return db.Queryable(); //没有设置数据规则,那么视为该资源允许被任何主体查看
@@ -1613,9 +1613,10 @@ public class CommonService : ICommonService
}
}
}
+ var tenantId = long.Parse(user.TenantId);
var tagNoList = tagNoDic.Select(x => x.Key);
var infoList = await db.Queryable()
- .Where(x => x.PermissionId == long.Parse(query.PermissionId) && tagNoList.Contains(x.TagNo))
+ .Where(x => x.PermissionId == long.Parse(query.PermissionId) && x.TenantId == tenantId && tagNoList.Contains(x.TagNo))
.WhereIF(query.IsGetDefault, x => x.UserId == 0)
.WhereIF(!query.IsGetDefault, x => (x.UserId == userId || x.UserId == 0))
.Select(x => new SysFieldSetTaskPlatResultDto(), true)
@@ -1695,21 +1696,23 @@ public class CommonService : ICommonService
{
throw new Exception(nameof(req.TaskTypeCode) + "取值有误:" + req.TaskTypeCode);
}
-
+ var tenantId = long.Parse(user.TenantId);
+ var userId = long.Parse(user.UserId);
var info = await db.Queryable()
- .Where(x => x.PermissionId == req.PermissionId && x.TagNo == tagNo)
+ .Where(x => x.PermissionId == req.PermissionId && x.TenantId == tenantId && x.TagNo == tagNo)
.WhereIF(req.IsSetDefault, x => x.UserId == 0)
- .WhereIF(!req.IsSetDefault, x => x.UserId == long.Parse(user.UserId))
+ .WhereIF(!req.IsSetDefault, x => x.UserId == userId)
.FirstAsync();
if (info.IsNull())
{
var entity = new SysFieldSet
{
- UserId = req.IsSetDefault ? 0 : long.Parse(user.UserId),
- TagNo = tagNo,
+ UserId = req.IsSetDefault ? 0 : userId,
PermissionId = req.PermissionId,
- Content = req.Content
+ Content = req.Content,
+ TenantId = tenantId,
+ TagNo = tagNo,
};
await db.Insertable(entity).ExecuteCommandAsync();
}
@@ -2127,7 +2130,7 @@ public class CommonService : ICommonService
/// 获取最新业务单据编码
///
///
- public async Task> GetSequenceNextAsync(SqlSugarScopeProvider tenantDb, IUser user,long saleId = 0)
+ public async Task> GetSequenceNextAsync(SqlSugarScopeProvider tenantDb, IUser user, long saleId = 0)
{
//生成编号
string sequenceNewNo = "";
diff --git a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user
index 73975b0c..996c16b7 100644
--- a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user
+++ b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user
@@ -1,6 +1,6 @@
- D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml
+ D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.MainApi/Program.cs b/ds-wms-service/DS.WMS.MainApi/Program.cs
index 5328c012..ccc6a314 100644
--- a/ds-wms-service/DS.WMS.MainApi/Program.cs
+++ b/ds-wms-service/DS.WMS.MainApi/Program.cs
@@ -44,6 +44,7 @@ builder.Services.AddSaasDbInstall();//分库服务
builder.Services.AddMultiLanguageInstall();//多语言服务
builder.Services.AddExcelModuleInstall();//Excel服务
builder.Services.AddPrintModuleInstall();//Print服务
+builder.Services.AddDjyModuleInstall();//Djy服务
builder.Services.AddRuleEngineModuleInstall();//Djy规则引擎校验服务
// builder.Services.AddEndpointsApiExplorer();
// builder.Services.AddSwaggerGen();
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 fb7be066..21e5222f 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:\Source\Repos\DS8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml
+ D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml
MvcControllerEmptyScaffolder
root/Common/MVC/Controller