去除引用common.props

This commit is contained in:
2023-11-06 19:35:59 +08:00
parent 6a2154edd9
commit c6b8dfc861
810 changed files with 3910 additions and 6695 deletions

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Models.User;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.Systems.Entitys.Dto.Module;

View File

@@ -1,5 +1,5 @@
using JNPF.DependencyInjection;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using JNPF.DependencyInjection;
namespace JNPF.OAuth.Dto;

View File

@@ -1,5 +1,5 @@
using JNPF.DependencyInjection;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using JNPF.DependencyInjection;
namespace JNPF.OAuth.Dto;

View File

@@ -1,50 +1,46 @@
using JNPF.Common.Const;
using JNPF.Common.Captcha.General;
using JNPF.Common.Captcha.General;
using JNPF.Common.Const;
using JNPF.Common.Core.Handlers;
using JNPF.Common.Core.Manager;
using JNPF.Common.Dtos.OAuth;
using JNPF.Common.Enums;
using JNPF.Common.Extension;
using JNPF.Common.Manager;
using JNPF.Common.Models;
using JNPF.Common.Models.User;
using JNPF.Common.Net;
using JNPF.Common.Options;
using JNPF.Common.Security;
using JNPF.DataEncryption;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.EventBus;
using JNPF.EventHandler;
using JNPF.Extras.CollectiveOAuth.Models;
using JNPF.Extras.DatabaseAccessor.SqlSugar.Models;
using JNPF.FriendlyException;
using JNPF.Logging.Attributes;
using JNPF.Message.Interfaces.Message;
using JNPF.OAuth.Dto;
using JNPF.OAuth.Model;
using JNPF.RemoteRequest.Extensions;
using JNPF.Systems.Entitys.Dto.Module;
using JNPF.Systems.Entitys.Enum;
using JNPF.Systems.Entitys.Model.Permission.SocialsUser;
using JNPF.Systems.Entitys.Model.SysConfig;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.Permission;
using JNPF.Systems.Interfaces.System;
using JNPF.UnifyResult;
using Mapster;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.CodeAnalysis;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using SqlSugar;
using JNPF.Systems.Entitys.Dto.Module;
using JNPF.Systems.Entitys.Model.Permission.SocialsUser;
using JNPF.Systems.Interfaces.Permission;
using JNPF.Extras.CollectiveOAuth.Models;
using JNPF.Common.Models;
using JNPF.Common.Options;
using Microsoft.CodeAnalysis;
using JNPF.Common.Core.Handlers;
using JNPF.Message.Interfaces.Message;
using JNPF.Extras.DatabaseAccessor.SqlSugar.Models;
using Aop.Api.Domain;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using bf = System.Reflection.BindingFlags;
using System.Linq.Expressions;
namespace JNPF.OAuth;
@@ -417,10 +413,10 @@ public class OAuthService : IDynamicApiController, ITransient
public async Task Logout([FromQuery] string ticket)
{
//modify by ly on 20230918
/* stopTimedTaskSvcCTS ??= new();
await _backgroundService.StopAsync(stopTimedTaskSvcCTS.Token);
stopTimedTaskSvcCTS.Cancel();
*/ //stopTimedTaskSvcCTS.Dispose();
/* stopTimedTaskSvcCTS ??= new();
await _backgroundService.StopAsync(stopTimedTaskSvcCTS.Token);
stopTimedTaskSvcCTS.Cancel();
*/ //stopTimedTaskSvcCTS.Dispose();
UserManager.AsscessToken = string.Empty;

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@@ -1,5 +1,4 @@
using JNPF.DependencyInjection;
using JNPF.Systems.Entitys.Model.Organize;
using Newtonsoft.Json.Linq;
namespace JNPF.Systems.Entitys.Dto.Department;

View File

@@ -7,7 +7,7 @@ namespace JNPF.Systems.Entitys.Dto.OrganizeAdministrator;
/// 机构分级管理创建输入.
/// </summary>
[SuppressSniffer]
public class OrganizeAdminIsTratorCrInput: TreeModel
public class OrganizeAdminIsTratorCrInput : TreeModel
{
/// <summary>
/// 用户主键.

View File

@@ -1,7 +1,4 @@
using System.Text.Json.Nodes;
using JNPF.Common.Filter;
using JNPF.Common.Models.User;
using JNPF.DependencyInjection;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Dto.Socials;

View File

@@ -1,5 +1,4 @@
using System.Text.Json.Serialization;
using JNPF.DependencyInjection;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Dto.User;

View File

@@ -1,5 +1,4 @@
using JNPF.DependencyInjection;
using System.Text.Json.Serialization;
namespace JNPF.Systems.Entitys.Dto.User;

View File

@@ -1,5 +1,4 @@
using JNPF.DependencyInjection;
using System;
namespace JNPF.Systems.Entitys.Dto.UsersCurrent;

View File

@@ -1,5 +1,5 @@
using JNPF.DependencyInjection;
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Dto.UsersCurrent;

View File

@@ -1,5 +1,5 @@
using JNPF.DependencyInjection;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Dto.ComFields;

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.DependencyInjection;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Dto.Database
{
@@ -13,7 +8,7 @@ namespace JNPF.Systems.Entitys.Dto.Database
[SuppressSniffer]
public class DatabaseTableDataCleanInput
{
/// <summary>
/// 数据库名称
/// </summary>

View File

@@ -36,5 +36,5 @@ public class DbSyncActionsExecuteInput
/// <summary>
/// 字段类型.
/// </summary>
public Dictionary<string,string> convertRuleMap { get; set; }
public Dictionary<string, string> convertRuleMap { get; set; }
}

View File

@@ -20,5 +20,5 @@ public class DbSyncOutput
/// <summary>
/// 映射字段.
/// </summary>
public Dictionary<string,List<string>> convertRuleMap { get; set; }
public Dictionary<string, List<string>> convertRuleMap { get; set; }
}

View File

@@ -1,6 +1,4 @@
using Newtonsoft.Json;
namespace JNPF.Systems.Entitys.Dto.System.InterfaceOauth
namespace JNPF.Systems.Entitys.Dto.System.InterfaceOauth
{
public class InterfaceOauthInput
{

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Systems.Entitys.Dto.DataInterFace;
using JNPF.Systems.Entitys.Dto.DataInterFace;
namespace JNPF.Systems.Entitys.Dto.System.InterfaceOauth
{

View File

@@ -1,5 +1,4 @@
using System.Text.Json.Serialization;
using JNPF.Common.Security;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Dto.PrintDev;

View File

@@ -9,7 +9,7 @@ namespace JNPF.Systems.Entitys.Dto.SysConfig;
public class SetAdminInput
{
/// <summary>
/// 赋予超级管理员 Id 集合.
/// </summary>
/// 赋予超级管理员 Id 集合.
/// </summary>
public List<string> adminIds { get; set; }
}

View File

@@ -1,5 +1,4 @@
using System.Text.Json.Serialization;
using JNPF.DependencyInjection;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Dto.SysLog;

View File

@@ -1,9 +1,8 @@
using JNPF.Common.Contracts;
using SqlSugar;
using SqlSugar;
namespace JNPF.Systems.Entitys.Permission;
public partial class OrganizeEntity
public partial class OrganizeEntity
{
/// <summary>
///

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using SqlSugar;
namespace JNPF.Systems.Entitys.Entity.Permission;

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using SqlSugar;
namespace JNPF.Systems.Entitys.Permission;

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using SqlSugar;
namespace JNPF.Systems.Entitys.Permission;

View File

@@ -1,6 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using SqlSugar;
using SqlSugar;
namespace JNPF.Systems.Entitys.Permission;

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using SqlSugar;
namespace JNPF.Systems.Entitys.Permission;

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using SqlSugar;
namespace JNPF.Systems.Entitys.System;

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using SqlSugar;
namespace JNPF.Systems.Entitys.System;

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using SqlSugar;
namespace JNPF.Systems.Entitys.System;

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using JNPF.Common.Enums;
using SqlSugar;

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using SqlSugar;
namespace JNPF.Systems.Entitys.System;

View File

@@ -1,5 +1,5 @@
using JNPF.DependencyInjection;
using System.ComponentModel;
using System.ComponentModel;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Enum;

View File

@@ -1,5 +1,5 @@
using JNPF.DependencyInjection;
using System.ComponentModel;
using System.ComponentModel;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Enum;

View File

@@ -1,5 +1,5 @@
using JNPF.DependencyInjection;
using System.ComponentModel;
using System.ComponentModel;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Enum;

View File

@@ -1,5 +1,5 @@
using JNPF.DependencyInjection;
using System.ComponentModel;
using System.ComponentModel;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Enum;

View File

@@ -1,5 +1,5 @@
using JNPF.DependencyInjection;
using System.ComponentModel;
using System.ComponentModel;
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Enum;

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mapster;
using Mapster;
using SqlSugar;
namespace Tnb.Systems.Entitys.Mapper

View File

@@ -46,7 +46,7 @@ public class SocialsUserInfo
public string socialName { get; set; }
}
public class AuthCallbackNew: AuthCallback
public class AuthCallbackNew : AuthCallback
{
public string authCode;
}

View File

@@ -1,6 +1,4 @@
using JNPF.DependencyInjection;
using NPOI.SS.Formula.Functions;
using SqlSugar;
namespace JNPF.Systems.Entitys.Dto.Database;

View File

@@ -1,6 +1,4 @@
using JNPF.DependencyInjection;
namespace JNPF.Systems.Entitys.Model.DataBase;
namespace JNPF.Systems.Entitys.Model.DataBase;
///// <summary>
///// 表列表实体.

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@@ -1,7 +1,4 @@
using Microsoft.AspNetCore.Http;
using OnceMi.AspNetCore.OSS;
namespace JNPF.Systems.Interfaces.Common;
namespace JNPF.Systems.Interfaces.Common;
/// <summary>
/// 通用控制器.

View File

@@ -85,5 +85,5 @@ public interface IOrganizeService
/// <param name="id"></param>
/// <param name="type"></param>
/// <returns></returns>
Task<OrganizeEntity> GetAnyParentByWorkstationId(string id,string type);
Task<OrganizeEntity> GetAnyParentByWorkstationId(string id, string type);
}

View File

@@ -17,7 +17,7 @@ public interface ISocialsUserService
List<SocialsUserListOutput> GetLoginList(string ticket);
Task<string> Binding([FromQuery] SocialsUserInputModel model);
Task<string> Binding([FromQuery] SocialsUserInputModel model);
Task<dynamic> GetSocialsUserInfo([FromQuery] SocialsUserInputModel model);

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Filter;
using JNPF.Systems.Entitys.Dto.User;
using JNPF.Systems.Entitys.Dto.User;
using JNPF.Systems.Entitys.Permission;
namespace JNPF.Systems.Interfaces.Permission;

View File

@@ -1,6 +1,6 @@
using JNPF.Common.Models.User;
using System.Linq.Expressions;
using JNPF.Common.Models.User;
using JNPF.Systems.Entitys.Permission;
using System.Linq.Expressions;
namespace JNPF.Systems.Interfaces.Permission;

View File

@@ -1,7 +1,7 @@
using JNPF.Common.Dtos.VisualDev;
using System.Data;
using JNPF.Common.Dtos.VisualDev;
using JNPF.Common.Models;
using JNPF.Systems.Entitys.System;
using System.Data;
namespace JNPF.Systems.Interfaces.System;

View File

@@ -1,5 +1,4 @@
using JNPF.Systems.Entitys.Dto.ModuleColumn;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Entitys.System;
namespace JNPF.Systems.Interfaces.System;

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@@ -1,19 +1,8 @@
using System.Data;
using JNPF.Common.Core.Manager;
using JNPF.Common.Filter;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Extras.Thirdparty.JSEngine;
using JNPF.JsonSerialization;
using JNPF.Logging.Attributes;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.TaskScheduler;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
namespace JNPF.Systems.Common;
@@ -24,12 +13,12 @@ namespace JNPF.Systems.Common;
[Route("api")]
public class HeartbeatService : IDynamicApiController, ITransient
{
[HttpGet("heartbeat")]
[AllowAnonymous]
[IgnoreLog]
public string Heartbeat()
{
return DateTime.Now.ToString();
}
[HttpGet("heartbeat")]
[AllowAnonymous]
[IgnoreLog]
public string Heartbeat()
{
return DateTime.Now.ToString();
}
}

View File

@@ -1,23 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aspose.Cells;
using JNPF.Common.Core.Manager;
using JNPF.Common.Core.Manager;
using JNPF.Common.Filter;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Systems.Entitys.Permission;
using JNPF.VisualDev;
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Entitys;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Mvc;
using NPOI.Util;
using SqlSugar;
using JNPF.Systems.Entitys.Permission;
using Mapster;
using JNPF.Common.Filter;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
namespace Tnb.BasicData
{

View File

@@ -1,15 +1,9 @@
using System.Data;
using JNPF.Common.Core.Manager;
using JNPF.Common.Filter;
using JNPF.Common.Security;
using JNPF.Common.Core.Manager;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Extras.Thirdparty.JSEngine;
using JNPF.JsonSerialization;
using JNPF.Logging.Attributes;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.TaskScheduler;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
@@ -71,17 +65,17 @@ public class TestService : IDynamicApiController, ITransient
}
public async Task ImportMoldData()
public async Task ImportMoldData()
{
}
public void xx(UserEntity user)
{
user.Account = "2312321";
public void xx(UserEntity user)
{
user.Account = "2312321";
}
}
public void xx1(UserEntity user)
{

View File

@@ -1,5 +1,4 @@
using Aop.Api.Domain;
using JNPF.Common.Const;
using JNPF.Common.Const;
using JNPF.Common.Core.Handlers;
using JNPF.Common.Core.Manager;
using JNPF.Common.Enums;
@@ -7,7 +6,6 @@ using JNPF.Common.Extension;
using JNPF.Common.Manager;
using JNPF.Common.Models.User;
using JNPF.Common.Security;
using JNPF.DatabaseAccessor;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.FriendlyException;

View File

@@ -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>

View File

@@ -6,10 +6,10 @@ using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.FriendlyException;
using JNPF.Systems.Interfaces.Permission;
using JNPF.Systems.Entitys.Dto.Group;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.Permission;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Contracts;
using JNPF.Common.Core.Manager;
using JNPF.Common.Core.Manager;
using JNPF.Common.Enums;
using JNPF.Common.Extension;
using JNPF.Common.Filter;
@@ -78,7 +77,8 @@ public class OrganizeAdministratorService : IOrganizeAdministratorService, IDyna
List<string>? orgIds = dataScope.Where(x => x.ThisLayerSelect.Equals(1)).Select(x => x.OrganizeId).ToList();
if (dataScope.Any(x => x.SubLayerSelect.Equals(1)))
{
dataScope.Where(x => x.SubLayerSelect.Equals(1)).ToList().ForEach(item => {
dataScope.Where(x => x.SubLayerSelect.Equals(1)).ToList().ForEach(item =>
{
var resList = _repository.AsSugarClient().Queryable<OrganizeEntity>().Where(o => !o.Id.Equals(item.OrganizeId) && o.OrganizeIdTree.Contains(item.OrganizeId) && o.DeleteMark == null && o.EnabledMark == 1).Select(x => x.Id).ToList();
orgIds.AddRange(resList);
});
@@ -352,7 +352,7 @@ public class OrganizeAdministratorService : IOrganizeAdministratorService, IDyna
resultItem.organizeIdTree = orgItem.OrganizeIdTree;
if (userItem.ThisLayerAdd.Equals(0)) resultItem.thisLayerAdd = -1;
else if(userItem.ThisLayerAdd.Equals(1)) resultItem.thisLayerAdd = 2;
else if (userItem.ThisLayerAdd.Equals(1)) resultItem.thisLayerAdd = 2;
else if (userItem.ThisLayerAdd.Equals(3) || userItem.ThisLayerAdd.Equals(1)) resultItem.thisLayerAdd = 3;
if (userItem.ThisLayerEdit.Equals(0)) resultItem.thisLayerEdit = -1;
@@ -504,7 +504,7 @@ public class OrganizeAdministratorService : IOrganizeAdministratorService, IDyna
[UnitOfWork]
public async Task Save([FromBody] OrganizeAdminIsTratorUpInput input)
{
if(input.userId.Equals(_userManager.UserId)) throw Oops.Oh(ErrorCode.D2304);
if (input.userId.Equals(_userManager.UserId)) throw Oops.Oh(ErrorCode.D2304);
// 处理组织树 名称
List<OrganizeEntity> orgTreeNameList = GetOrgListTreeName();
@@ -552,7 +552,7 @@ public class OrganizeAdministratorService : IOrganizeAdministratorService, IDyna
});
// 管理员权限
var adminList= currList.Where(x => x.ThisLayerAdd.Equals(1) || x.ThisLayerEdit.Equals(1) || x.ThisLayerDelete.Equals(1) || x.ThisLayerSelect.Equals(1) ||
var adminList = currList.Where(x => x.ThisLayerAdd.Equals(1) || x.ThisLayerEdit.Equals(1) || x.ThisLayerDelete.Equals(1) || x.ThisLayerSelect.Equals(1) ||
x.SubLayerAdd.Equals(1) || x.SubLayerEdit.Equals(1) || x.SubLayerDelete.Equals(1) || x.SubLayerSelect.Equals(1)).Where(x => x.UserId.Equals(_userManager.UserId)).ToList().Copy();
adminList.Where(x => x.SubLayerAdd.Equals(1) || x.SubLayerEdit.Equals(1) || x.SubLayerDelete.Equals(1) || x.SubLayerSelect.Equals(1)).ToList().ForEach(item =>
{
@@ -733,7 +733,7 @@ public class OrganizeAdministratorService : IOrganizeAdministratorService, IDyna
/// <returns></returns>
private List<OrganizeAdministratorEntity> GetOrganizeAdministrators(List<OrganizeAdminCrInput> orgAdminList, string userId, List<OrganizeAdministratorEntity> oldList, List<OrganizeAdministratorEntity> adminList)
{
if(!_userManager.IsAdministrator)
if (!_userManager.IsAdministrator)
{
var addItems = new List<OrganizeAdminCrInput>();
orgAdminList.ForEach(item =>
@@ -768,7 +768,7 @@ public class OrganizeAdministratorService : IOrganizeAdministratorService, IDyna
});
oldList.ForEach(item =>
{
if(!orgAdminList.Any(x => x.organizeId.Equals(item.OrganizeId)) && !adminList.Any(x => x.OrganizeId.Equals(item.OrganizeId)))
if (!orgAdminList.Any(x => x.organizeId.Equals(item.OrganizeId)) && !adminList.Any(x => x.OrganizeId.Equals(item.OrganizeId)))
{
addItems.Add(new OrganizeAdminCrInput()
{

View File

@@ -19,7 +19,6 @@ using JNPF.Systems.Interfaces.System;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Tnb.BasicData;
using Yitter.IdGenerator;
namespace JNPF.Systems;
@@ -317,19 +316,19 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
queryWhere = queryWhere.And(x => x.DeleteMark == null);
List<OrganizeListOutput>? data = await _repository.AsQueryable().Where(queryWhere)
.WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.FullName.Contains(input.keyword) || a.EnCode.Contains(input.keyword)).Select(a => new OrganizeListOutput
{
id = a.Id,
organizeIdTree = a.OrganizeIdTree,
type = a.Category,
parentId = a.ParentId,
lastFullName = a.FullName,
fullName = a.FullName,
enabledMark = a.EnabledMark,
creatorTime = a.CreatorTime,
icon = a.Category.Equals("company") ? "icon-ym icon-ym-tree-organization3" : "icon-ym icon-ym-tree-department1",
sortCode = a.SortCode,
isLeaf = true
}).ToListAsync();
{
id = a.Id,
organizeIdTree = a.OrganizeIdTree,
type = a.Category,
parentId = a.ParentId,
lastFullName = a.FullName,
fullName = a.FullName,
enabledMark = a.EnabledMark,
creatorTime = a.CreatorTime,
icon = a.Category.Equals("company") ? "icon-ym icon-ym-tree-organization3" : "icon-ym icon-ym-tree-department1",
sortCode = a.SortCode,
isLeaf = true
}).ToListAsync();
// 获取所有组织
List<OrganizeEntity>? allOrgList = GetOrgListTreeName();
@@ -420,7 +419,7 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
});
});
if(adminlist.Any()) await _repository.AsSugarClient().Insertable(adminlist).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync();
if (adminlist.Any()) await _repository.AsSugarClient().Insertable(adminlist).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync();
#endregion
#region
@@ -839,9 +838,9 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
public async Task<OrganizeEntity> GetAnyParentByWorkstationId(string id, string type)
{
return await _repository.AsQueryable()
.LeftJoin<OrganizeEntity>((a,b)=>a.OrganizeIdTree.Contains(b.Id) && b.Category==type)
.Where((a,b)=>a.Id==id)
.Select((a,b)=>b).FirstAsync();
.LeftJoin<OrganizeEntity>((a, b) => a.OrganizeIdTree.Contains(b.Id) && b.Category == type)
.Where((a, b) => a.Id == id)
.Select((a, b) => b).FirstAsync();
}
/// <summary>

View File

@@ -4,7 +4,6 @@ using JNPF.Common.Enums;
using JNPF.Common.Extension;
using JNPF.Common.Filter;
using JNPF.Common.Manager;
using JNPF.Common.Models.User;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;

View File

@@ -1,5 +1,4 @@
using System.Web;
using JNPF.Common.Const;
using JNPF.Common.Core.Manager;
using JNPF.Common.Enums;
using JNPF.Common.Manager;
@@ -354,7 +353,7 @@ public class SocialsUserService : ISocialsUserService, IDynamicApiController, IT
return new WeChatOpenAuthRequest(clientConfig, authStateCache);
case DefaultAuthSourceEnum.WECHAT_ENTERPRISE:
//return new WeChatEnterpriseAuthRequest(clientConfig, authStateCache);
//return new WeChatEnterpriseAuthRequest(clientConfig, authStateCache);
case DefaultAuthSourceEnum.WECHAT_ENTERPRISE_SCAN:
clientConfig.redirectUri = HttpUtility.UrlEncode(clientConfig.redirectUri);

View File

@@ -384,7 +384,7 @@ public class UserRelationService : IUserRelationService, IDynamicApiController,
else
{
return _repository.AsSugarClient().Queryable<UserRelationEntity, UserEntity>((a, b) => new JoinQueryInfos(JoinType.Left, a.UserId == b.Id))
.Where((a, b) => b.DeleteMark == null && (objId.Contains(a.ObjectId)|| objId.Contains(a.UserId)) && b.EnabledMark > 0).Select(a => a.UserId).Distinct().ToList();
.Where((a, b) => b.DeleteMark == null && (objId.Contains(a.ObjectId) || objId.Contains(a.UserId)) && b.EnabledMark > 0).Select(a => a.UserId).Distinct().ToList();
}
}
else

View File

@@ -335,7 +335,8 @@ public class UsersCurrentService : IUsersCurrentService, IDynamicApiController,
user.ChangePasswordDate = DateTime.Now;
user.LastModifyTime = DateTime.Now;
user.LastModifyUserId = _userManager.UserId;
int isOk = await _repository.AsUpdateable(user).UpdateColumns(it => new {
int isOk = await _repository.AsUpdateable(user).UpdateColumns(it => new
{
it.Password,
it.ChangePasswordDate,
it.LastModifyUserId,
@@ -356,7 +357,8 @@ public class UsersCurrentService : IUsersCurrentService, IDynamicApiController,
userInfo.IsAdministrator = Convert.ToInt32(_userManager.IsAdministrator);
userInfo.LastModifyTime = DateTime.Now;
userInfo.LastModifyUserId = _userManager.UserId;
int isOk = await _repository.AsUpdateable(userInfo).UpdateColumns(it => new {
int isOk = await _repository.AsUpdateable(userInfo).UpdateColumns(it => new
{
it.RealName,
it.Signature,
it.Gender,
@@ -390,7 +392,8 @@ public class UsersCurrentService : IUsersCurrentService, IDynamicApiController,
user.Theme = input.theme;
user.LastModifyTime = DateTime.Now;
user.LastModifyUserId = _userManager.UserId;
int isOk = await _repository.AsUpdateable(user).UpdateColumns(it => new {
int isOk = await _repository.AsUpdateable(user).UpdateColumns(it => new
{
it.Theme,
it.LastModifyUserId,
it.LastModifyTime
@@ -409,7 +412,8 @@ public class UsersCurrentService : IUsersCurrentService, IDynamicApiController,
user.Language = input.language;
user.LastModifyTime = DateTime.Now;
user.LastModifyUserId = _userManager.UserId;
int isOk = await _repository.AsUpdateable(user).UpdateColumns(it => new {
int isOk = await _repository.AsUpdateable(user).UpdateColumns(it => new
{
it.Language,
it.LastModifyUserId,
it.LastModifyTime
@@ -428,7 +432,8 @@ public class UsersCurrentService : IUsersCurrentService, IDynamicApiController,
user.HeadIcon = name;
user.LastModifyTime = DateTime.Now;
user.LastModifyUserId = _userManager.UserId;
int isOk = await _repository.AsUpdateable(user).UpdateColumns(it => new {
int isOk = await _repository.AsUpdateable(user).UpdateColumns(it => new
{
it.HeadIcon,
it.LastModifyUserId,
it.LastModifyTime
@@ -521,7 +526,8 @@ public class UsersCurrentService : IUsersCurrentService, IDynamicApiController,
userInfo.LastModifyTime = DateTime.Now;
userInfo.LastModifyUserId = _userManager.UserId;
int isOk = await _repository.AsUpdateable(userInfo).UpdateColumns(it => new {
int isOk = await _repository.AsUpdateable(userInfo).UpdateColumns(it => new
{
it.OrganizeId,
it.PositionId,
it.LastModifyUserId,

View File

@@ -1,4 +1,4 @@
using Aop.Api.Domain;
using System.Linq.Expressions;
using JNPF.Common.Configuration;
using JNPF.Common.Const;
using JNPF.Common.Core.Manager;
@@ -32,21 +32,11 @@ using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.Permission;
using JNPF.Systems.Interfaces.System;
using Mapster;
using Microsoft.AspNetCore.Authentication.OAuth;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.CodeAnalysis;
using Microsoft.Extensions.Options;
using NPOI.SS.Formula.Eval;
using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Ocsp;
using Qiniu.Util;
using Senparc.NeuChar.App.AppStore;
using SqlSugar;
using System;
using System.Linq.Expressions;
using System.Security.Principal;
using System.Text.Json.Nodes;
namespace JNPF.Systems;
@@ -312,7 +302,8 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
.Where((a, b) => b.ObjectType == "Organize" && orgList.Contains(b.ObjectId)).Where((a, b) => a.EnabledMark == 1 && a.DeleteMark == null)
.Where((a, b) => a.RealName.Contains(input.keyword) || a.Account.Contains(input.keyword))
.GroupBy((a, b) => new { a.Id, a.RealName, a.Account, a.EnabledMark })
.Select((a, b) => new {
.Select((a, b) => new
{
id = a.Id,
fullName = SqlFunc.MergeString(a.RealName, "/", a.Account),
enabledMark = a.EnabledMark,
@@ -357,7 +348,8 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
var res = await _repository.AsSugarClient().Queryable<UserEntity, UserRelationEntity>((a, b) => new JoinQueryInfos(JoinType.Left, b.UserId == a.Id))
.Where((a, b) => b.ObjectType == "Organize" && b.ObjectId == input.organizeId).Where((a, b) => a.EnabledMark == 1 && a.DeleteMark == null)
.GroupBy((a, b) => new { a.Id, a.RealName, a.Account, a.EnabledMark })
.Select((a, b) => new {
.Select((a, b) => new
{
id = a.Id,
fullName = SqlFunc.MergeString(a.RealName, "/", a.Account),
enabledMark = a.EnabledMark,
@@ -564,7 +556,7 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
var oids = userList.Where(x => x.UserId.Equals(item.id)).Select(x => x.ObjectId).ToList();
var oTree = orgList.Where(x => oids.Contains(x.Id)).Select(x => x.Description).ToList();
item.organize = string.Join(",", oTree);
//item.type = org.fullName;
//item.type = org.fullName;
});
}
@@ -1148,7 +1140,7 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
public async Task Update(string id, [FromBody] UserUpInput input)
{
UserEntity? oldUserEntity = await _repository.GetFirstAsync(it => it.Id == id);
input.roleId = input.roleId == null ? string.Empty : input.roleId;
input.roleId = input.roleId == null ? string.Empty : input.roleId;
// 超级管理员 只有 admin 账号才有变更权限
if (_userManager.UserId != oldUserEntity.Id && oldUserEntity.IsAdministrator == 1 && _userManager.Account != "admin")
@@ -1240,7 +1232,8 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
try
{
// 更新用户记录
int newEntity = await _repository.AsUpdateable(entity).UpdateColumns(it => new {
int newEntity = await _repository.AsUpdateable(entity).UpdateColumns(it => new
{
it.Account,
it.RealName,
it.QuickQuery,

View File

@@ -311,7 +311,7 @@ public class BillRuleService : IBillRullService, IDynamicApiController, ITransie
if (entity != null)
{
// 处理隔天流水号归0
if (entity.OutputNumber != null)
if (entity.OutputNumber != null)
{
var serialDate = entity.OutputNumber.Remove(entity.OutputNumber.Length - (int)entity.Digit).Replace(entity.Prefix, string.Empty);
var thisDate = entity.DateFormat == "no" ? string.Empty : DateTime.Now.ToString(entity.DateFormat);

View File

@@ -4,7 +4,6 @@ using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using JNPF.ClayObject;
using JNPF.Common.Configuration;
using JNPF.Common.Const;
using JNPF.Common.Core.Manager;
@@ -521,7 +520,8 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
if (interfaceOauthEntity == null) return null;
var ymDate = DateTime.Now.ParseToUnixTime().ToString();
var authorization = GetVerifySignature(interfaceOauthEntity, intefaceId, ymDate);
return new {
return new
{
YmDate = ymDate,
Authorization = authorization,
};
@@ -564,7 +564,7 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
var result = await Preview(id, input);
if (result is DataTable)
{
List<Dictionary<string,Object>> list = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(result));
List<Dictionary<string, Object>> list = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(result));
return list.FirstOrDefault()?.Keys.ToList() ?? Enumerable.Empty<string>();
}
else
@@ -712,7 +712,8 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
{
// 分页
var dt = GetPageToDataTable(resTable, input.currentPage, input.pageSize);
output = new {
output = new
{
pagination = new PageResult()
{
currentPage = input.currentPage,
@@ -759,7 +760,8 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
// });
//}
resList = resList.FindAll(x => x.Where(xx => xx.Value != null && xx.Value.Contains(input.keyword)).Any());
output = new {
output = new
{
pagination = new PageResult()
{
currentPage = input.currentPage,
@@ -798,7 +800,8 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
if (input.sort.Equals("desc")) resList = resList.OrderBy(x => x[input.sidx]).ToList();
else resList = resList.OrderByDescending(x => x[input.sidx]).ToList();
}
output = new {
output = new
{
pagination = new PageResult()
{
currentPage = input.currentPage,
@@ -810,7 +813,8 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
}
else
{
output = new {
output = new
{
pagination = new PageResult()
{
currentPage = input.currentPage,

View File

@@ -242,7 +242,7 @@ public class DataSyncService : IDynamicApiController, ITransient
fieldTypeList.Add("number", GetDataTypeList(3, dbTypeTo));
fieldTypeList.Add("number", GetDataTypeList(4, dbTypeTo));
fieldTypeList.Add("clob", GetDataTypeList(5, dbTypeTo));
break ;
break;
case "dm":
fieldTypeList.Add("varchar", GetDataTypeList(0, dbTypeTo));
fieldTypeList.Add("int", GetDataTypeList(1, dbTypeTo));

View File

@@ -1,5 +1,4 @@
using JNPF.ClayObject.Extensions;
using JNPF.Common.Core.Manager;
using JNPF.Common.Core.Manager;
using JNPF.Common.Core.Manager.Files;
using JNPF.Common.Enums;
using JNPF.Common.Manager;

View File

@@ -22,7 +22,7 @@ namespace JNPF.Systems.System;
/// 接口认证
/// 版 本V3.2
/// 版 权拓通智联科技有限公司http://www.tuotong-tech.com
/// 日 期2021-06-01.
/// 日 期2021-06-01.
/// </summary>
[ApiDescriptionSettings(Tag = "System", Name = "InterfaceOauth", Order = 202)]
[Route("api/system/[controller]")]

View File

@@ -12,7 +12,6 @@ using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.System;
using JNPF.VisualDev.Engine;
using JNPF.VisualDev.Engine.Core;
using JNPF.VisualDev.Entitys;
using Mapster;
using Microsoft.AspNetCore.Mvc;
@@ -74,7 +73,7 @@ public class ModuleColumnService : IModuleColumnService, IDynamicApiController,
fullName = a.FullName,
enCode = SqlFunc.IF(a.FieldRule == 1 && !SqlFunc.IsNullOrEmpty(a.BindTable)).Return(a.EnCode.Replace("jnpf_" + a.BindTable + "_jnpf_", ""))
.ElseIF(b.Type == 3 && a.FieldRule == 1).Return(a.EnCode.Replace(a.BindTable + ".", ""))
.ElseIF(a.FieldRule == 2).Return(a.EnCode.Replace(a.ChildTableKey+"-", "")).End(a.EnCode),
.ElseIF(a.FieldRule == 2).Return(a.EnCode.Replace(a.ChildTableKey + "-", "")).End(a.EnCode),
id = a.Id,
sortCode = a.SortCode
}).ToListAsync();
@@ -91,7 +90,7 @@ public class ModuleColumnService : IModuleColumnService, IDynamicApiController,
{
var data = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null);
if (data.FieldRule == 2 && data.ChildTableKey.IsNotEmptyOrNull())
data.EnCode = data.EnCode.Replace(data.ChildTableKey+"-", string.Empty);
data.EnCode = data.EnCode.Replace(data.ChildTableKey + "-", string.Empty);
var menu = await _repository.AsSugarClient().Queryable<ModuleEntity>().FirstAsync(x => x.Id == data.ModuleId && x.DeleteMark == null);
if (menu.IsNotEmptyOrNull() && data.BindTable.IsNotEmptyOrNull() && data.FieldRule == 1)
{
@@ -138,7 +137,7 @@ public class ModuleColumnService : IModuleColumnService, IDynamicApiController,
{
var entity = input.Adapt<ModuleColumnEntity>();
if (entity.FieldRule == 2 && input.childTableKey.IsNotEmptyOrNull())
entity.EnCode = input.childTableKey +"-"+ entity.EnCode;
entity.EnCode = input.childTableKey + "-" + entity.EnCode;
var menu = await _repository.AsSugarClient().Queryable<ModuleEntity>().FirstAsync(x => x.Id == input.moduleId && x.DeleteMark == null);
if (menu.IsNotEmptyOrNull() && entity.BindTable.IsNotEmptyOrNull() && entity.FieldRule == 1)
{
@@ -236,7 +235,7 @@ public class ModuleColumnService : IModuleColumnService, IDynamicApiController,
entity.FullName = item.fullName;
entity.BindTable = item.bindTable;
entity.FieldRule = item.fieldRule;
entity.ChildTableKey=item.childTableKey;
entity.ChildTableKey = item.childTableKey;
entity.SortCode = 0;
if (entity.FieldRule == 2 && item.childTableKey.IsNotEmptyOrNull())
entity.EnCode = item.childTableKey + "-" + entity.EnCode;

View File

@@ -10,7 +10,6 @@ using JNPF.Systems.Entitys.Dto.ModuleDataAuthorize;
using JNPF.Systems.Entitys.Dto.ModuleDataAuthorizeScheme;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.System;
using JNPF.VisualDev.Engine;
using JNPF.VisualDev.Engine.Core;
using JNPF.VisualDev.Entitys;
using Mapster;

View File

@@ -12,7 +12,6 @@ using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.System;
using JNPF.VisualDev.Engine;
using JNPF.VisualDev.Engine.Core;
using JNPF.VisualDev.Entitys;
using Mapster;
using Microsoft.AspNetCore.Mvc;

View File

@@ -1,10 +1,9 @@
using JNPF.Common.Security;
using System.Runtime.InteropServices;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Systems.Entitys.Dto.Monitor;
using JNPF.Systems.Interfaces.System;
using Microsoft.AspNetCore.Mvc;
using System.Runtime.InteropServices;
namespace JNPF.Systems;

View File

@@ -90,9 +90,9 @@ public class PrintDevService : IDynamicApiController, ITransient
[HttpGet("")]
public async Task<dynamic> GetList_Api([FromQuery] PrintDevListInput input)
{
var list = await _repository.AsSugarClient().Queryable<PrintDevEntity, UserEntity, UserEntity, DictionaryTypeEntity,DictionaryDataEntity>((a, b, c, d,e) =>
new JoinQueryInfos(JoinType.Left, b.Id == a.CreatorUserId, JoinType.Left, c.Id == a.LastModifyUserId,JoinType.Left,d.EnCode=="printDev", JoinType.Left, a.Category == e.EnCode && d.Id==e.DictionaryTypeId))
.Where((a, b, c, d,e) => a.DeleteMark == null )
var list = await _repository.AsSugarClient().Queryable<PrintDevEntity, UserEntity, UserEntity, DictionaryTypeEntity, DictionaryDataEntity>((a, b, c, d, e) =>
new JoinQueryInfos(JoinType.Left, b.Id == a.CreatorUserId, JoinType.Left, c.Id == a.LastModifyUserId, JoinType.Left, d.EnCode == "printDev", JoinType.Left, a.Category == e.EnCode && d.Id == e.DictionaryTypeId))
.Where((a, b, c, d, e) => a.DeleteMark == null)
.WhereIF(input.category.IsNotEmptyOrNull(), a => a.Category == input.category)
.WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.FullName.Contains(input.keyword) || a.EnCode.Contains(input.keyword))
.OrderBy(a => a.SortCode).OrderBy(a => a.CreatorTime, OrderByType.Desc)
@@ -120,10 +120,10 @@ public class PrintDevService : IDynamicApiController, ITransient
[HttpGet("Selector")]
public async Task<dynamic> GetList_Api([FromQuery] string type)
{
var list = await _repository.AsSugarClient().Queryable<PrintDevEntity, UserEntity, UserEntity, DictionaryTypeEntity,DictionaryDataEntity>((a, b, c, d,e) => new JoinQueryInfos(JoinType.Left, b.Id == a.CreatorUserId, JoinType.Left, c.Id == a.LastModifyUserId, JoinType.Left, d.EnCode=="printDev", JoinType.Left, a.Category == e.EnCode && d.Id==e.DictionaryTypeId))
var list = await _repository.AsSugarClient().Queryable<PrintDevEntity, UserEntity, UserEntity, DictionaryTypeEntity, DictionaryDataEntity>((a, b, c, d, e) => new JoinQueryInfos(JoinType.Left, b.Id == a.CreatorUserId, JoinType.Left, c.Id == a.LastModifyUserId, JoinType.Left, d.EnCode == "printDev", JoinType.Left, a.Category == e.EnCode && d.Id == e.DictionaryTypeId))
.Where((a, b, c, d) => a.DeleteMark == null && a.EnabledMark == 1).OrderBy(a => a.SortCode).OrderBy(a => a.CreatorTime, OrderByType.Desc)
.WhereIF(type.IsNotEmptyOrNull(), (a) => a.Type == type.ParseToInt())
.Select((a, b, c, d,e) => new PrintDevListOutput
.Select((a, b, c, d, e) => new PrintDevListOutput
{
category = a.Category,
id = a.Id,

View File

@@ -1,5 +1,6 @@
using JNPF.Common.Core.Manager;
using JNPF.Common.Enums;
using JNPF.Common.Extension;
using JNPF.Common.Filter;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
@@ -12,7 +13,6 @@ using JNPF.Systems.Entitys.Permission;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using JNPF.Common.Extension;
namespace JNPF.Systems.System;
@@ -94,7 +94,7 @@ public class PrintLogService : IDynamicApiController, ITransient
public async Task Delete([FromBody] PrintLogOutuut input)
{
var entity = input.Adapt<PrintLogEntity>();
entity.Id= SnowflakeIdHelper.NextId();
entity.Id = SnowflakeIdHelper.NextId();
entity.PrintMan = _userManager.UserId;
entity.PrintTime = DateTime.Now;
var isOk = await _repository.AsInsertable(entity).ExecuteCommandAsync();

View File

@@ -6,7 +6,6 @@ using JNPF.DynamicApiController;
using JNPF.FriendlyException;
using JNPF.Systems.Entitys.Dto.Province;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.System;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;

View File

@@ -1,4 +1,5 @@
using JNPF.Common.Extension;
using System.Reflection;
using JNPF.Common.Extension;
using JNPF.Common.Filter;
using JNPF.DatabaseAccessor;
using JNPF.DependencyInjection;
@@ -10,7 +11,6 @@ using JNPF.Systems.Entitys.System;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Reflection;
namespace JNPF.Systems;

View File

@@ -1,10 +1,8 @@
using Aop.Api.Domain;
using JNPF.Common.Const;
using JNPF.Common.Const;
using JNPF.Common.Core.Handlers;
using JNPF.Common.Core.Manager;
using JNPF.Common.Enums;
using JNPF.Common.Extension;
using JNPF.Common.Filter;
using JNPF.Common.Manager;
using JNPF.Common.Models.User;
using JNPF.Common.Security;

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>