From 951fa0201553702226dd87cfc249c4366bef08cc Mon Sep 17 00:00:00 2001
From: zhoukeda <1315948824@qq.com>
Date: Thu, 7 Sep 2023 11:43:51 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=B7=A5=E4=BD=8Did?=
=?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BB=BB=E6=84=8F=E4=B8=8A=E7=BA=A7=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Permission/IOrganizeService.cs | 8 ++++++++
system/Tnb.Systems/Permission/OrganizeService.cs | 9 +++++++++
2 files changed, 17 insertions(+)
diff --git a/system/Tnb.Systems.Interfaces/Permission/IOrganizeService.cs b/system/Tnb.Systems.Interfaces/Permission/IOrganizeService.cs
index 2f5aa59d..92a02c9b 100644
--- a/system/Tnb.Systems.Interfaces/Permission/IOrganizeService.cs
+++ b/system/Tnb.Systems.Interfaces/Permission/IOrganizeService.cs
@@ -78,4 +78,12 @@ public interface IOrganizeService
///
///
Task> GetChildOrgId(string id);
+
+ ///
+ /// 根据工位id获取其任意上级
+ ///
+ ///
+ ///
+ ///
+ Task GetAnyParentByWorkstationId(string id,string type);
}
\ No newline at end of file
diff --git a/system/Tnb.Systems/Permission/OrganizeService.cs b/system/Tnb.Systems/Permission/OrganizeService.cs
index fd02a5a2..e2a7bf88 100644
--- a/system/Tnb.Systems/Permission/OrganizeService.cs
+++ b/system/Tnb.Systems/Permission/OrganizeService.cs
@@ -19,6 +19,7 @@ using JNPF.Systems.Interfaces.System;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
+using Tnb.BasicData;
using Yitter.IdGenerator;
namespace JNPF.Systems;
@@ -835,6 +836,14 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
return (await _repository.GetListAsync(x => x.OrganizeIdTree.Contains(id) && x.EnabledMark == 1 && x.DeleteMark == null)).Select(x => x.Id).ToList();
}
+ public async Task GetAnyParentByWorkstationId(string id, string type)
+ {
+ return await _repository.AsQueryable()
+ .LeftJoin((a,b)=>a.OrganizeIdTree.Contains(b.Id) && b.Category==type)
+ .Where((a,b)=>a.Id==id)
+ .Select((a,b)=>b).FirstAsync();
+ }
+
///
/// 处理组织树 名称.
///
From eed5c27a3fc8fbf51166064f736ad3dc753167d9 Mon Sep 17 00:00:00 2001
From: PhilPan
Date: Thu, 7 Sep 2023 16:16:59 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D-=E5=8F=91=E5=B8=83?=
=?UTF-8?q?=E6=97=B6=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E8=B7=AF=E5=BE=84?=
=?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
visualdev/Tnb.Vengine/CodeGenerator/TemplateContext.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/visualdev/Tnb.Vengine/CodeGenerator/TemplateContext.cs b/visualdev/Tnb.Vengine/CodeGenerator/TemplateContext.cs
index a62b4cd9..61468d79 100644
--- a/visualdev/Tnb.Vengine/CodeGenerator/TemplateContext.cs
+++ b/visualdev/Tnb.Vengine/CodeGenerator/TemplateContext.cs
@@ -1,4 +1,5 @@
using System.Text.RegularExpressions;
+using JNPF.Common.Configuration;
using Tnb.Core;
namespace Tnb.Vengine;
@@ -26,7 +27,7 @@ public class TemplateContext
#if DEBUG
BasePath = CodeHelper.GetSolutionDirectoryPath(false)!;
#else
- BasePath = EApp.Options.App.AcmenBasePath;
+ BasePath = FileVariable.GenerateCodePath;
#endif
ModuleCode = moduleCode;
}