组织新增修改接口bug
This commit is contained in:
@@ -6,6 +6,7 @@ using JNPF.Common.Security;
|
|||||||
using JNPF.DependencyInjection;
|
using JNPF.DependencyInjection;
|
||||||
using JNPF.DynamicApiController;
|
using JNPF.DynamicApiController;
|
||||||
using JNPF.FriendlyException;
|
using JNPF.FriendlyException;
|
||||||
|
using JNPF.Logging;
|
||||||
using JNPF.Systems.Entitys.Dto.Department;
|
using JNPF.Systems.Entitys.Dto.Department;
|
||||||
using JNPF.Systems.Entitys.Dto.Organize;
|
using JNPF.Systems.Entitys.Dto.Organize;
|
||||||
using JNPF.Systems.Entitys.Dto.SysConfig;
|
using JNPF.Systems.Entitys.Dto.SysConfig;
|
||||||
@@ -248,7 +249,8 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
|||||||
if (await _repository.IsAnyAsync(o => o.ParentId == input.parentId && o.FullName == input.fullName && o.Category == "department" && o.DeleteMark == null))
|
if (await _repository.IsAnyAsync(o => o.ParentId == input.parentId && o.FullName == input.fullName && o.Category == "department" && o.DeleteMark == null))
|
||||||
throw Oops.Oh(ErrorCode.D2019);
|
throw Oops.Oh(ErrorCode.D2019);
|
||||||
OrganizeEntity? entity = input.Adapt<OrganizeEntity>();
|
OrganizeEntity? entity = input.Adapt<OrganizeEntity>();
|
||||||
entity.Category = "department";
|
// entity.Category = "department";
|
||||||
|
entity.Category = input.category;
|
||||||
entity.Id = SnowflakeIdHelper.NextId();
|
entity.Id = SnowflakeIdHelper.NextId();
|
||||||
entity.EnabledMark = 1;
|
entity.EnabledMark = 1;
|
||||||
entity.CreatorTime = DateTime.Now;
|
entity.CreatorTime = DateTime.Now;
|
||||||
@@ -473,7 +475,8 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
|||||||
var processVal = jsonObj.GetValue("rowprocess");
|
var processVal = jsonObj.GetValue("rowprocess");
|
||||||
if (processVal is not null)
|
if (processVal is not null)
|
||||||
{
|
{
|
||||||
var dic = _repository.GetList().ToDictionary(x => x.FullName, x => x.Id);
|
//modifyby zhoukeda 2023.06.25
|
||||||
|
var dic = _repository.GetList(x=>x.DeleteMark==null).ToDictionary(x => x.FullName, x => x.Id);
|
||||||
var procList = jsonObj.Value<JArray>("rowprocess");
|
var procList = jsonObj.Value<JArray>("rowprocess");
|
||||||
var pids = procList.Select(x => x.Value<string>("id")).Distinct().ToList();
|
var pids = procList.Select(x => x.Value<string>("id")).Distinct().ToList();
|
||||||
var dbProcIds = await _repository.AsSugarClient().Queryable<BasProcessStation>().Where(it => pids.Contains(it.process_id)).Select(it => it.process_id).ToListAsync();
|
var dbProcIds = await _repository.AsSugarClient().Queryable<BasProcessStation>().Where(it => pids.Contains(it.process_id)).Select(it => it.process_id).ToListAsync();
|
||||||
@@ -517,8 +520,9 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
|||||||
if (sysConfig.qyhIsSynOrg) await _synThirdInfoService.SynDep(1, 1, sysConfig, orgList);
|
if (sysConfig.qyhIsSynOrg) await _synThirdInfoService.SynDep(1, 1, sysConfig, orgList);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Log.Error(e.Message);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,4 +17,8 @@
|
|||||||
<ProjectReference Include="..\..\visualdev\Tnb.VisualDev.Engine\Tnb.VisualDev.Engine.csproj" />
|
<ProjectReference Include="..\..\visualdev\Tnb.VisualDev.Engine\Tnb.VisualDev.Engine.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Tnb.Core" Version="2023.5.25.958" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user