去除引用common.props
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
using System.Collections;
|
||||
using Aop.Api.Domain;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.Extras.CollectiveOAuth.Models;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Logging;
|
||||
using JNPF.Systems.Entitys.Dto.Department;
|
||||
@@ -20,7 +17,6 @@ using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Senparc.Weixin.MP.AdvancedAPIs.Comment.CommentJson;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData;
|
||||
using Tnb.BasicData.Entities;
|
||||
@@ -315,7 +311,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
|
||||
if (adminlist.Any()) await _repository.AsSugarClient().Insertable(adminlist).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync();
|
||||
#endregion
|
||||
|
||||
|
||||
if (input.category != DictConst.RegionCategoryCompanyCode)
|
||||
{
|
||||
var jsonObj = input.propertyJson;
|
||||
@@ -478,7 +474,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
|
||||
int isOK = await _repository.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandAsync();
|
||||
if (!(isOK > 0)) throw Oops.Oh(ErrorCode.D2018);
|
||||
|
||||
|
||||
//modified by zkd on 20230718 处理二维码
|
||||
if (input.category != DictConst.RegionCategoryCompanyCode)
|
||||
{
|
||||
@@ -486,7 +482,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
var qrcode = jsonObj.GetValue("qrcode");
|
||||
if (qrcode is not null && !string.IsNullOrEmpty(qrcode.ToString()))
|
||||
{
|
||||
if (await _repository.AsSugarClient().Queryable<BasQrcode>().AnyAsync(x => x.code == qrcode.ToString() && x.source_id!=id))
|
||||
if (await _repository.AsSugarClient().Queryable<BasQrcode>().AnyAsync(x => x.code == qrcode.ToString() && x.source_id != id))
|
||||
{
|
||||
throw Oops.Bah("二维码总表中已存在该二维码");
|
||||
}
|
||||
@@ -514,7 +510,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//modified by ly on 20230426 处理工位信息,将工位插入到设备表
|
||||
if (input.category == DictConst.RegionCategoryStationCode)
|
||||
{
|
||||
@@ -555,7 +551,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
if (processVal is not null)
|
||||
{
|
||||
//modifyby zhoukeda 2023.06.25
|
||||
var dic = _repository.GetList(x=>x.DeleteMark==null).ToDictionary(x => x.FullName, x => x.Id);
|
||||
var dic = _repository.GetList(x => x.DeleteMark == null).ToDictionary(x => x.FullName, x => x.Id);
|
||||
var procList = jsonObj.Value<JArray>("rowprocess");
|
||||
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();
|
||||
@@ -584,11 +580,11 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
isOK = await _repository.AsSugarClient().Updateable<BasProcessStation>(it => new BasProcessStation { station_id = "", station_code = "" }).Where(it => curProcIds.Contains(it.process_id)).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
var correlation= jsonObj.GetValue("correlation");
|
||||
var correlation = jsonObj.GetValue("correlation");
|
||||
if (correlation is not null)
|
||||
{
|
||||
await _repository.AsSugarClient().Deleteable<OrganizeRelationEntity>(p => p.OrganizeId == id && p.ObjectType == "User").ExecuteCommandAsync();
|
||||
var OrganizeRelationEntitys=new List<OrganizeRelationEntity>();
|
||||
var OrganizeRelationEntitys = new List<OrganizeRelationEntity>();
|
||||
for (int i = 0; i < correlation.Count(); i++)
|
||||
{
|
||||
OrganizeRelationEntity organizeRelationEntity = new OrganizeRelationEntity();
|
||||
@@ -651,7 +647,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> GetFpropertyjsonById(Dictionary<string,string> dic)
|
||||
public async Task<dynamic> GetFpropertyjsonById(Dictionary<string, string> dic)
|
||||
{
|
||||
string id = dic["id"];
|
||||
string type = dic["type"];
|
||||
@@ -681,9 +677,9 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
if (dictionary.TryGetValue("rowprocess", out var value))
|
||||
{
|
||||
List<BasProcess> processes = JsonConvert.DeserializeObject<List<BasProcess>>(JsonConvert.SerializeObject(value));
|
||||
return new Dictionary<string,object>()
|
||||
return new Dictionary<string, object>()
|
||||
{
|
||||
["list"] = processes.Select(x=>new
|
||||
["list"] = processes.Select(x => new
|
||||
{
|
||||
id = x.id,
|
||||
code = x.process_code,
|
||||
@@ -693,7 +689,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Dictionary<string,object>()
|
||||
return new Dictionary<string, object>()
|
||||
{
|
||||
["list"] = Enumerable.Empty<int>()
|
||||
};
|
||||
@@ -720,7 +716,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据工位id获取车间信息
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user