From 9196cbfd66ffccd849706077cdad2e03d6345cc3 Mon Sep 17 00:00:00 2001
From: ky_xiaz <574434302@qq.com>
Date: Thu, 20 May 2021 17:37:10 +0800
Subject: [PATCH 1/2] update Tree
---
Api/Ewide.Core/Ewide.Core.xml | 10 +++++++
.../Service/Dict/Dto/DictTreeOutput.cs | 29 +++++++++++++++++--
.../Service/Dict/SysDictTypeService.cs | 19 +++++-------
3 files changed, 45 insertions(+), 13 deletions(-)
diff --git a/Api/Ewide.Core/Ewide.Core.xml b/Api/Ewide.Core/Ewide.Core.xml
index 8d9d44b..6d76c63 100644
--- a/Api/Ewide.Core/Ewide.Core.xml
+++ b/Api/Ewide.Core/Ewide.Core.xml
@@ -3969,6 +3969,16 @@
名称-对应字典值的value
+
+
+ 备注
+
+
+
+
+ 排序
+
+
子节点集合
diff --git a/Api/Ewide.Core/Service/Dict/Dto/DictTreeOutput.cs b/Api/Ewide.Core/Service/Dict/Dto/DictTreeOutput.cs
index b2144b1..67d1505 100644
--- a/Api/Ewide.Core/Service/Dict/Dto/DictTreeOutput.cs
+++ b/Api/Ewide.Core/Service/Dict/Dto/DictTreeOutput.cs
@@ -1,11 +1,12 @@
-using System.Collections.Generic;
+using System.Collections;
+using System.Collections.Generic;
namespace Ewide.Core.Service
{
///
/// 字典类型与字典值构造的树
///
- public class DictTreeOutput
+ public class DictTreeOutput : ITreeNode
{
///
/// Id
@@ -27,9 +28,33 @@ namespace Ewide.Core.Service
///
public string Name { get; set; }
+ ///
+ /// 备注
+ ///
+ public string Remark { set; get; }
+
+ ///
+ /// 排序
+ ///
+ public int Sort { set; get; }
///
/// 子节点集合
///
public List Children { get; set; } = new List();
+
+ public string GetId()
+ {
+ return Id;
+ }
+
+ public string GetPid()
+ {
+ return Pid;
+ }
+
+ public void SetChildren(IList children)
+ {
+ Children = (List)children;
+ }
}
}
diff --git a/Api/Ewide.Core/Service/Dict/SysDictTypeService.cs b/Api/Ewide.Core/Service/Dict/SysDictTypeService.cs
index 5532c86..f5ae5b1 100644
--- a/Api/Ewide.Core/Service/Dict/SysDictTypeService.cs
+++ b/Api/Ewide.Core/Service/Dict/SysDictTypeService.cs
@@ -178,19 +178,16 @@ namespace Ewide.Core.Service
[HttpGet("/sysDictType/tree")]
public async Task> GetDictTree()
{
- return await _sysDictTypeRep.DetachedEntities.Select(u => new DictTreeOutput
+ var DictTypeList = await _sysDictTypeRep.AsQueryable().ToListAsync();
+ return new TreeBuildUtil().DoTreeBuild(DictTypeList.Select(u => new DictTreeOutput
{
- Id = u.Id,
+ Name=u.Name,
Code = u.Code,
- Name = u.Name,
- Children = u.SysDictDatas.Select(c => new DictTreeOutput
- {
- Id = c.Id,
- Pid = c.TypeId,
- Code = c.Code,
- Name = c.Value
- }).ToList()
- }).ToListAsync();
+ Pid=u.Pid,
+ Id=u.Id,
+ Remark=u.Remark,
+ Sort =u.Sort
+ }).OrderBy(s => s.Sort).ToList());
}
///
/// 创建Pids格式
From 4e733db8ede1751769a268637396d21569d9c00e Mon Sep 17 00:00:00 2001
From: ky_xiaz <574434302@qq.com>
Date: Thu, 20 May 2021 17:38:08 +0800
Subject: [PATCH 2/2] update
---
Api/Ewide.Application/Ewide.Application.xml | 32 ++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/Api/Ewide.Application/Ewide.Application.xml b/Api/Ewide.Application/Ewide.Application.xml
index 335e000..4b5757d 100644
--- a/Api/Ewide.Application/Ewide.Application.xml
+++ b/Api/Ewide.Application/Ewide.Application.xml
@@ -329,6 +329,36 @@
主管部门
+
+
+ 单位类型,多选
+
+
+
+
+ 单位名称
+
+
+
+
+ 单位负责人
+
+
+
+
+ 单位负责人电话
+
+
+
+
+ 单位联系人
+
+
+
+
+ 单位联系人电话
+
+
房屋编码相关
@@ -338,7 +368,7 @@
获取同一区域下的下一个编号
-
+