diff --git a/Directory.Build.props b/Directory.Build.props index a78d6df4..c5ae6e0e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ $(MSBuildThisFileDirectory) latest - $(NoWarn);CS1570;CS1587;CS1591;CS8601;CS8602;CS8603;CS8618; + $(NoWarn);CS1570;CS1587;CS1591; enable enable diff --git a/common.props b/common.props deleted file mode 100644 index 6734521c..00000000 --- a/common.props +++ /dev/null @@ -1,12 +0,0 @@ - - - latest - $(NoWarn);CS1591; - - - - none - false - - - \ No newline at end of file diff --git a/common/Tnb.Common/Extension/TnbStringExtensions.cs b/common/Tnb.Common/Extension/TnbStringExtensions.cs index c6412e97..47a5cc9f 100644 --- a/common/Tnb.Common/Extension/TnbStringExtensions.cs +++ b/common/Tnb.Common/Extension/TnbStringExtensions.cs @@ -187,7 +187,7 @@ public static class StringExtensions /// /// 查找路径的上一级 /// - public static (string?, string) LastSplitOnce(this string str, char seperate) + public static (string?, string) GetParent(this string str, char seperate) { int n = str.LastIndexOf(seperate); if (n > 0) diff --git a/common/Tnb.Common/Utils/ThrowIf.cs b/common/Tnb.Common/Utils/ThrowIf.cs index b1cea249..fef2357b 100644 --- a/common/Tnb.Common/Utils/ThrowIf.cs +++ b/common/Tnb.Common/Utils/ThrowIf.cs @@ -13,44 +13,37 @@ public static class ThrowIf } } - public static T IsNull([NotNull] T? value, string? msg = null, [CallerArgumentExpression("value")] string? paraName = null) + public static void IsNull([NotNull] T? value, string? msg = null, [CallerArgumentExpression("value")] string? paraName = null) { if (value == null) { throw string.IsNullOrEmpty(msg) ? new ArgumentNullException(paraName) : new ArgumentException(msg); } - - return value; } - public static T IsNullOrDefault([NotNull] T? value, string? msg = null, [CallerArgumentExpression("value")] string? paraName = null) where T : struct + public static void IsNullOrDefault([NotNull] T? value, string? msg = null, [CallerArgumentExpression("value")] string? paraName = null) where T : struct { if (!value.HasValue || value.Value.Equals(default(T))) { throw string.IsNullOrEmpty(msg) ? new ArgumentException("值不可为空或默认值", paraName) : new ArgumentException(msg); } - - return value.Value; } - public static string IsNullOrWhiteSpace([NotNull] string? value, string? msg = null, [CallerArgumentExpression("value")] string? paraName = null) + public static void IsNullOrWhiteSpace([NotNull] string? value, string? msg = null, [CallerArgumentExpression("value")] string? paraName = null) { if (string.IsNullOrWhiteSpace(value)) { throw string.IsNullOrEmpty(msg) ? new ArgumentException("值不可为空或空格", paraName) : new ArgumentException(msg); } - return value; } - public static string IsNullOrEmpty([NotNull] string? value, string? msg = null, [CallerArgumentExpression("value")] string? paraName = null) + public static void IsNullOrEmpty([NotNull] string? value, string? msg = null, [CallerArgumentExpression("value")] string? paraName = null) { if (string.IsNullOrEmpty(value)) { throw string.IsNullOrEmpty(msg) ? new ArgumentException("值不可为空", paraName) : new ArgumentException(msg); } - - return value; } //public static ICollection NotNullOrEmpty(ICollection value, string paraName) @@ -74,64 +67,52 @@ public static class ThrowIf // return type; //} - public static short OutOfRange(short value, string paraName, short minimumValue, short maximumValue = short.MaxValue) + public static void OutOfRange(short value, string paraName, short minimumValue, short maximumValue = short.MaxValue) { if (value < minimumValue || value > maximumValue) { throw new ArgumentException($"{paraName} is out of range min: {minimumValue} - max: {maximumValue}"); } - - return value; } - public static int OutOfRange(int value, string paraName, int minimumValue, int maximumValue = int.MaxValue) + public static void OutOfRange(int value, string paraName, int minimumValue, int maximumValue = int.MaxValue) { if (value < minimumValue || value > maximumValue) { throw new ArgumentException($"{paraName} is out of range min: {minimumValue} - max: {maximumValue}"); } - - return value; } - public static long OutOfRange(long value, string paraName, long minimumValue, long maximumValue = long.MaxValue) + public static void OutOfRange(long value, string paraName, long minimumValue, long maximumValue = long.MaxValue) { if (value < minimumValue || value > maximumValue) { throw new ArgumentException($"{paraName} is out of range min: {minimumValue} - max: {maximumValue}"); } - - return value; } - public static float OutOfRange(float value, string paraName, float minimumValue, float maximumValue = float.MaxValue) + public static void OutOfRange(float value, string paraName, float minimumValue, float maximumValue = float.MaxValue) { if (value < minimumValue || value > maximumValue) { throw new ArgumentException($"{paraName} is out of range min: {minimumValue} - max: {maximumValue}"); } - - return value; } - public static double OutOfRange(double value, string paraName, double minimumValue, double maximumValue = double.MaxValue) + public static void OutOfRange(double value, string paraName, double minimumValue, double maximumValue = double.MaxValue) { if (value < minimumValue || value > maximumValue) { throw new ArgumentException($"{paraName} is out of range min: {minimumValue} - max: {maximumValue}"); } - - return value; } - public static decimal OutOfRange(decimal value, string paraName, decimal minimumValue, decimal maximumValue = decimal.MaxValue) + public static void OutOfRange(decimal value, string paraName, decimal minimumValue, decimal maximumValue = decimal.MaxValue) { if (value < minimumValue || value > maximumValue) { throw new ArgumentException($"{paraName} is out of range min: {minimumValue} - max: {maximumValue}"); } - - return value; } } diff --git a/extend/Tnb.Extend.Entitys/Dto/BigData/BigDataListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/BigData/BigDataListOutput.cs deleted file mode 100644 index 0a718324..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/BigData/BigDataListOutput.cs +++ /dev/null @@ -1,30 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.BigData; - -/// -/// 大数据列表. -/// -[SuppressSniffer] -public class BigDataListOutput -{ - /// - /// 编码. - /// - public string? enCode { get; set; } - - /// - /// 名称. - /// - public string? fullName { get; set; } - - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentActionsShareInput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentActionsShareInput.cs deleted file mode 100644 index 36369c27..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentActionsShareInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 共享文件. -/// -[SuppressSniffer] -public class DocumentActionsShareInput -{ - /// - /// 共享用户. - /// - public string? userId { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentCrInput.cs deleted file mode 100644 index 2062a467..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentCrInput.cs +++ /dev/null @@ -1,25 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 添加文件夹. -/// -[SuppressSniffer] -public class DocumentCrInput -{ - /// - /// 文件夹名称. - /// - public string? fullName { get; set; } - - /// - /// 文档父级. - /// - public string? parentId { get; set; } - - /// - /// 文档分类. - /// - public int? type { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentFolderTreeOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentFolderTreeOutput.cs deleted file mode 100644 index 5a835428..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentFolderTreeOutput.cs +++ /dev/null @@ -1,21 +0,0 @@ -using JNPF.Common.Security; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 获取知识管理列表(文件夹树). -/// -[SuppressSniffer] -public class DocumentFolderTreeOutput : TreeModel -{ - /// - /// 图标. - /// - public string? icon { get; set; } - - /// - /// 文件名. - /// - public string? fullName { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentInfoOutput.cs deleted file mode 100644 index 6aa4c4d1..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentInfoOutput.cs +++ /dev/null @@ -1,36 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 获取文件/文件夹信息. -/// -[SuppressSniffer] -public class DocumentInfoOutput -{ - /// - /// 父级id. - /// - public string? parentId { get; set; } - - /// - /// 文件类型. - /// - public int? type { get; set; } - - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 文件名/文件夹名. - /// - public string? fullName { get; set; } - - /// - /// 后缀名. - /// - public string? fileExtension { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentListOutput.cs deleted file mode 100644 index 6ab9381b..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentListOutput.cs +++ /dev/null @@ -1,65 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 获取知识管理列表(全部文档). -/// -[SuppressSniffer] -public class DocumentListOutput -{ - /// - /// 创建日期. - /// - public DateTime? creatorTime { get; set; } - - /// - /// 是否分享. - /// - public int? isShare { get; set; } - - /// - /// 类型(0-文件夹,1-文件). - /// - public int? type { get; set; } - - /// - /// 大小. - /// - public string? fileSize { get; set; } - - /// - /// 名称. - /// - public string? fullName { get; set; } - - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 后缀名. - /// - public string? fileExtension { get; set; } - - /// - /// 父级Id. - /// - public string? parentId { get; set; } - - /// - /// 文档下载地址. - /// - public string? uploaderUrl { get; set; } - - /// - /// 文件路径. - /// - public string? filePath { get; set; } - - /// - /// 是否支持预览. - /// - public string? isPreview { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentShareOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentShareOutput.cs deleted file mode 100644 index 8f4135ff..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentShareOutput.cs +++ /dev/null @@ -1,40 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 知识管理(我的共享列表). -/// -[SuppressSniffer] -public class DocumentShareOutput -{ - /// - /// 共享日期. - /// - public DateTime? shareTime { get; set; } - - /// - /// 大小. - /// - public string fileSize { get; set; } - - /// - /// 文件名. - /// - public string fullName { get; set; } - - /// - /// 主键id. - /// - public string id { get; set; } - - /// - /// 文件类型. - /// - public int? type { get; set; } - - /// - /// 后缀名. - /// - public string fileExtension { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentShareTomeOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentShareTomeOutput.cs deleted file mode 100644 index 1b09d2a8..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentShareTomeOutput.cs +++ /dev/null @@ -1,40 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 获取知识管理列表(共享给我). -/// -[SuppressSniffer] -public class DocumentShareTomeOutput -{ - /// - /// 共享日期. - /// - public DateTime? shareTime { get; set; } - - /// - /// 大小. - /// - public string? fileSize { get; set; } - - /// - /// 名称. - /// - public string? fullName { get; set; } - - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 共享人员Id. - /// - public string? creatorUserId { get; set; } - - /// - /// 后缀名. - /// - public string? fileExtension { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentShareUserOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentShareUserOutput.cs deleted file mode 100644 index e4b3c617..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentShareUserOutput.cs +++ /dev/null @@ -1,30 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 获取知识管理列表(共享人员). -/// -[SuppressSniffer] -public class DocumentShareUserOutput -{ - /// - /// 共享时间. - /// - public DateTime? shareTime { get; set; } - - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 共享人员id. - /// - public string? shareUserId { get; set; } - - /// - /// 文档id. - /// - public string? documentId { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentTrashOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentTrashOutput.cs deleted file mode 100644 index 90e705bb..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentTrashOutput.cs +++ /dev/null @@ -1,40 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 回收站(彻底删除). -/// -[SuppressSniffer] -public class DocumentTrashOutput -{ - /// - /// 删除日期. - /// - public DateTime? deleteTime { get; set; } - - /// - /// 大小. - /// - public string? fileSize { get; set; } - - /// - /// 名称. - /// - public string? fullName { get; set; } - - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 后缀名. - /// - public string? fileExtension { get; set; } - - /// - /// 类型. - /// - public int? type { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentUpInput.cs deleted file mode 100644 index 19b96619..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentUpInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Document; - -/// -/// 修改文件名/文件夹名. -/// -[SuppressSniffer] -public class DocumentUpInput : DocumentCrInput -{ - /// - /// 主键id. - /// - public string? id { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentUploaderInput.cs b/extend/Tnb.Extend.Entitys/Dto/Document/DocumentUploaderInput.cs deleted file mode 100644 index 4d63e07a..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Document/DocumentUploaderInput.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JNPF.DependencyInjection; -using Microsoft.AspNetCore.Http; - -namespace JNPF.Extend.Entitys.Dto.Document; - -[SuppressSniffer] -public class DocumentUploaderInput -{ - /// - /// 上级文件id. - /// - public string? parentId { get; set; } - - /// - /// 上级文件id. - /// - public IFormFile? file { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/DocumentPreview/DocumentPreviewListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/DocumentPreview/DocumentPreviewListOutput.cs deleted file mode 100644 index 04612330..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/DocumentPreview/DocumentPreviewListOutput.cs +++ /dev/null @@ -1,35 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.DocumentPreview; - -/// -/// 获取文档列表. -/// -[SuppressSniffer] -public class DocumentPreviewListOutput -{ - /// - /// 文件名称. - /// - public string? fileName { get; set; } - - /// - /// 文件大小. - /// - public string? fileSize { get; set; } - - /// - /// 主键id . - /// - public string? fileId { get; set; } - - /// - /// 修改时间. - /// - public string? fileTime { get; set; } - - /// - /// 文件类型. - /// - public string? fileType { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/DocumentPreview/DocumentPreviewPreviewInput.cs b/extend/Tnb.Extend.Entitys/Dto/DocumentPreview/DocumentPreviewPreviewInput.cs deleted file mode 100644 index 49f57f30..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/DocumentPreview/DocumentPreviewPreviewInput.cs +++ /dev/null @@ -1,51 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.DocumentPreview; - -/// -/// 预览文档. -/// -[SuppressSniffer] -public class DocumentPreviewPreviewInput -{ - /// - /// 文件id. - /// - public string? fileId { get; set; } - - /// - /// 是否强制重新转换(忽略缓存),true为强制重新转换,false为不强制重新转换. - /// - public bool noCache { get; set; } - - /// - /// 针对单文档设置水印内容. - /// - public string? watermark { get; set; } - - /// - /// 0否1是,默认为0。针对单文档设置是否防复制. - /// - public int isCopy{ get; set; } - - /// - /// 开始位置. - /// - public string? pageStart { get; set; } - - /// - /// 结束位置. - /// - public string? pageEnd { get; set; } - - /// - /// 类型. - /// - public string? type { get; set; } - - /// - /// 预览方式(localPreview:本地,yozoOnlinePreview:在线). - /// - public string? previewType { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/DocumentPreview/DocumentPreviewPreviewOutput.cs b/extend/Tnb.Extend.Entitys/Dto/DocumentPreview/DocumentPreviewPreviewOutput.cs deleted file mode 100644 index 70f3011c..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/DocumentPreview/DocumentPreviewPreviewOutput.cs +++ /dev/null @@ -1,21 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.DocumentPreview; - -/// -/// 预览文档. -/// -[SuppressSniffer] -public class DocumentPreviewPreviewOutput -{ - /// - /// 文件名称. - /// - public string? fileName { get; set; } - - /// - /// 文件路径. - /// - public string? filePath { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Email/EmailActionsSaveDraftInput.cs b/extend/Tnb.Extend.Entitys/Dto/Email/EmailActionsSaveDraftInput.cs deleted file mode 100644 index 5522ca24..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Email/EmailActionsSaveDraftInput.cs +++ /dev/null @@ -1,11 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Email; - -/// -/// 存草稿. -/// -[SuppressSniffer] -public class EmailActionsSaveDraftInput : EmailSendInput -{ -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Email/EmailConfigActionsCheckMailInput.cs b/extend/Tnb.Extend.Entitys/Dto/Email/EmailConfigActionsCheckMailInput.cs deleted file mode 100644 index f50eef0e..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Email/EmailConfigActionsCheckMailInput.cs +++ /dev/null @@ -1,11 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Email; - -/// -/// 邮箱配置-测试连接. -/// -[SuppressSniffer] -public class EmailConfigActionsCheckMailInput : EmailConfigInfoOutput -{ -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Email/EmailConfigInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Email/EmailConfigInfoOutput.cs deleted file mode 100644 index cecc60c6..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Email/EmailConfigInfoOutput.cs +++ /dev/null @@ -1,50 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Email; - -/// -/// 获取邮箱配置. -/// -[SuppressSniffer] -public class EmailConfigInfoOutput -{ - /// - /// POP3服务地址. - /// - public string? pop3Host { get; set; } - - /// - /// POP3端口. - /// - public string? pop3Port { get; set; } - - /// - /// SMTP服务器地址. - /// - public string? smtpHost { get; set; } - - /// - /// SMTP端口. - /// - public string? smtpPort { get; set; } - - /// - /// 显示名称. - /// - public string? senderName { get; set; } - - /// - /// 是否开户SSL登录(1-是,0否). - /// - public int? emailSsl { get; set; } - - /// - /// 密码. - /// - public string? password { get; set; } - - /// - /// 邮箱地址. - /// - public string? account { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Email/EmailConfigUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/Email/EmailConfigUpInput.cs deleted file mode 100644 index 6fd19fc6..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Email/EmailConfigUpInput.cs +++ /dev/null @@ -1,50 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Email; - -/// -/// 更新邮件配置. -/// -[SuppressSniffer] -public class EmailConfigUpInput -{ - /// - /// POP3服务地址. - /// - public string? pop3Host { get; set; } - - /// - /// POP3端口. - /// - public string? pop3Port { get; set; } - - /// - /// SMTP服务器地址. - /// - public string? smtpHost { get; set; } - - /// - /// SMTP端口. - /// - public string? smtpPort { get; set; } - - /// - /// 显示名称. - /// - public string? senderName { get; set; } - - /// - /// 是否开户SSL登录(1-是,0否). - /// - public int? emailSsl { get; set; } - - /// - /// 密码. - /// - public string? password { get; set; } - - /// - /// 邮箱地址. - /// - public string? account { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Email/EmailHomeOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Email/EmailHomeOutput.cs deleted file mode 100644 index bf6bc211..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Email/EmailHomeOutput.cs +++ /dev/null @@ -1,22 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Email; - -[SuppressSniffer] -public class EmailHomeOutput -{ - /// - /// ID. - /// - public string? id { get; set; } - - /// - /// 标题. - /// - public string? fullName { get; set; } - - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Email/EmailInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Email/EmailInfoOutput.cs deleted file mode 100644 index fe8b2d29..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Email/EmailInfoOutput.cs +++ /dev/null @@ -1,71 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Email; - -/// -/// 获取邮件信息. -/// -[SuppressSniffer] -public class EmailInfoOutput -{ - /// - /// 邮件主题. - /// - public string? subject { get; set; } - - /// - /// 发件人姓名. - /// - public string? senderName { get; set; } - - /// - /// 发件人邮箱. - /// - public string? sender { get; set; } - - /// - /// 时间. - /// - public DateTime? fdate { get; set; } - - /// - /// 收件人. - /// - public string? mAccount { get; set; } - - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 附件对象. - /// - public string? attachment { get; set; } - - /// - /// 邮件内容. - /// - public string? bodyText { get; set; } - - /// - /// 抄送人. - /// - public string? cC { get; set; } - - /// - /// 密送人. - /// - public string? bCC { get; set; } - - /// - /// 收件人. - /// - public string? recipient { get; set; } - - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } -} - diff --git a/extend/Tnb.Extend.Entitys/Dto/Email/EmailListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Email/EmailListOutput.cs deleted file mode 100644 index d6488c5a..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Email/EmailListOutput.cs +++ /dev/null @@ -1,55 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Email; - -/// -/// (带分页)获取邮件列表(收件箱、标星件、草稿箱、已发送). -/// -[SuppressSniffer] -public class EmailListOutput -{ - /// - /// 是否已读(1-已读,0-未) inBox,star. - /// - public int? isRead { get; set; } - - /// - /// 时间 inBox,star. - /// - public DateTime? fdate { get; set; } - - /// - /// 主键ID. - /// - public string? id { get; set; } - - /// - /// 主题. - /// - public string? subject { get; set; } - - /// - /// 是否标星(1-是,0-否)inBox,star. - /// - public int? starred { get; set; } - - /// - /// 附件. - /// - public string? attachment { get; set; } - - /// - /// 发件人 inBox,star. - /// - public string? sender { get; set; } - - /// - /// 收件人 draft,sent. - /// - public string? recipient { get; set; } - - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Email/EmailListQuery.cs b/extend/Tnb.Extend.Entitys/Dto/Email/EmailListQuery.cs deleted file mode 100644 index edf3ba7a..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Email/EmailListQuery.cs +++ /dev/null @@ -1,28 +0,0 @@ -using JNPF.Common.Filter; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Email -{ - /// - /// (带分页)获取邮件列表入参(收件箱、标星件、草稿箱、已发送). - /// - [SuppressSniffer] - public class EmailListQuery : PageInputBase - { - /// - /// 开始时间,时间戳. - /// - public long? startTime { get; set; } - - /// - /// 结束时间,时间戳. - /// - public long? endTime { get; set; } - - /// - /// 类型. - /// - public string? type { get; set; } - - } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Email/EmailSendInput.cs b/extend/Tnb.Extend.Entitys/Dto/Email/EmailSendInput.cs deleted file mode 100644 index 8563fbeb..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Email/EmailSendInput.cs +++ /dev/null @@ -1,46 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Email -{ - /// - /// 发邮件. - /// - [SuppressSniffer] - public class EmailSendInput - { - /// - /// id. - /// - public string? id { get; set; } - - /// - /// 主题. - /// - public string? subject { get; set; } - - /// - /// 收件人. - /// - public string? recipient { get; set; } - - /// - /// 正文. - /// - public string? bodyText { get; set; } - - /// - /// 附件. - /// - public string? attachment { get; set; } - - /// - /// 抄送人. - /// - public string? cc { get; set; } - - /// - /// 密送人. - /// - public string? bcc { get; set; } - } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Employee/EmployeeListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Employee/EmployeeListOutput.cs deleted file mode 100644 index e0638289..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Employee/EmployeeListOutput.cs +++ /dev/null @@ -1,90 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Employee; - -/// -/// 获取职员列表(分页). -/// -[SuppressSniffer] -public class EmployeeListOutput -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 工号. - /// - public string? enCode { get; set; } - - /// - /// 姓名. - /// - public string? fullName { get; set; } - - /// - /// 性别ID. - /// - public string? gender { get; set; } - - /// - /// 部门. - /// - public string? departmentName { get; set; } - - /// - /// 岗位. - /// - public string? positionName { get; set; } - - /// - /// 用工性质. - /// - public string? workingNature { get; set; } - - /// - /// 身份证. - /// - public string? idNumber { get; set; } - - /// - /// 联系电话. - /// - public string? telephone { get; set; } - - /// - /// 生日. - /// - public DateTime? birthday { get; set; } - - /// - /// 参加工作时间. - /// - public DateTime? attendWorkTime { get; set; } - - /// - /// 学历. - /// - public string? education { get; set; } - - /// - /// 所学专业. - /// - public string? major { get; set; } - - /// - /// 毕业院校. - /// - public string? graduationAcademy { get; set; } - - /// - /// 毕业时间. - /// - public DateTime? graduationTime { get; set; } - - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Employee/EmployeeListQuery.cs b/extend/Tnb.Extend.Entitys/Dto/Employee/EmployeeListQuery.cs deleted file mode 100644 index af359a1c..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Employee/EmployeeListQuery.cs +++ /dev/null @@ -1,27 +0,0 @@ -using JNPF.Common.Filter; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Employee; - -/// -/// 获取职员列表(分页). -/// -[SuppressSniffer] -public class EmployeeListQuery : PageInputBase -{ - /// - /// 查询内容. - /// - public string? condition { get; set; } - - /// - /// 查询字段. - /// - public string? selectKey { get; set; } - - /// - /// 是否分页(0:分页). - /// - public string? dataType { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Employee/ImportDataInput.cs b/extend/Tnb.Extend.Entitys/Dto/Employee/ImportDataInput.cs deleted file mode 100644 index 0dd4344d..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Employee/ImportDataInput.cs +++ /dev/null @@ -1,12 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Employee; - -[SuppressSniffer] -public class ImportDataInput -{ - /// - /// 导入数据. - /// - public List? list { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Employee/ImportDataOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Employee/ImportDataOutput.cs deleted file mode 100644 index ac331192..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Employee/ImportDataOutput.cs +++ /dev/null @@ -1,27 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Employee; - -[SuppressSniffer] -public class ImportDataOutput -{ - /// - /// 导入失败信息. - /// - public List failResult { get; set; } = new List(); - - /// - /// 失败条数. - /// - public int fnum { get; set; } - - /// - /// 导入是否成功(0:成功). - /// - public int resultType { get; set; } - - /// - /// 成功条数. - /// - public int snum { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderActionsNextOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderActionsNextOutput.cs deleted file mode 100644 index 013e1221..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderActionsNextOutput.cs +++ /dev/null @@ -1,11 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 获取订单信息(下一个订单). -/// -[SuppressSniffer] -public class OrderActionsNextOutput : OrderInfoOutput -{ -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderActionsPrevOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderActionsPrevOutput.cs deleted file mode 100644 index 28acd06b..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderActionsPrevOutput.cs +++ /dev/null @@ -1,11 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 获取订单信息(上一个订单). -/// -[SuppressSniffer] -public class OrderActionsPrevOutput : OrderInfoOutput -{ -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderCollectionPlanOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderCollectionPlanOutput.cs deleted file mode 100644 index d5c97fe3..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderCollectionPlanOutput.cs +++ /dev/null @@ -1,45 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 获取订单列表-收款计划. -/// -[SuppressSniffer] -public class OrderCollectionPlanOutput -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 收款日期. - /// - public DateTime? receivableDate { get; set; } - - /// - /// 收款比率. - /// - public decimal? receivableRate { get; set; } - - /// - /// 收款金额. - /// - public string? receivableMoney { get; set; } - - /// - /// 收款方式. - /// - public string? receivableMode { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } - - /// - /// 收款摘要. - /// - public string? fabstract { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderCrInput.cs deleted file mode 100644 index 934e4dfa..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderCrInput.cs +++ /dev/null @@ -1,312 +0,0 @@ -using JNPF.Common.Models.WorkFlow; -using JNPF.DependencyInjection; -using Newtonsoft.Json; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 新建订单. -/// -[SuppressSniffer] -public class OrderCrInput: FlowTaskOtherModel -{ - /// - /// 客户名称. - /// - public string? customerName { get; set; } - - /// - /// 业务人员id. - /// - public string? salesmanId { get; set; } - - /// - /// 订单日期. - /// - public DateTime? orderDate { get; set; } - - /// - /// 订单编码. - /// - public string? orderCode { get; set; } - - /// - /// 付款方式. - /// - public string? paymentMode { get; set; } - - /// - /// 付款金额. - /// - public decimal? receivableMoney { get; set; } - - /// - /// 定金比率. - /// - public decimal? earnestRate { get; set; } - - /// - /// 预付定金. - /// - public decimal? prepayEarnest { get; set; } - - /// - /// 运输方式. - /// - public string? transportMode { get; set; } - - /// - /// 发货日期. - /// - public DateTime? deliveryDate { get; set; } - - /// - /// 发货地址. - /// - public string? deliveryAddress { get; set; } - - /// - /// 相关附近. - /// - public string? fileJson { get; set; } - - /// - /// 客户ID. - /// - public string? customerId { get; set; } - - /// - /// 业务人员名字. - /// - public string? salesmanName { get; set; } - - /// - ///备注. - /// - public string? description { get; set; } - - /// - /// 主键. - /// - public string? id { get; set; } - - /// - /// 状态. - /// - public int? status { get; set; } - - /// - /// 紧急程度. - /// - public int? flowUrgent { get; set; } = 1; - - /// - /// 商品列表. - /// - public List? goodsList { get; set; } - - /// - /// 收款计划列表. - /// - public List? collectionPlanList { get; set; } -} - -/// -/// 订单明细. -/// -public class OrderInfo -{ - /// - /// 客户名称. - /// - public string? customerName { get; set; } - - /// - /// 业务人员id. - /// - public string? salesmanId { get; set; } - - /// - /// 订单日期. - /// - public DateTime? orderDate { get; set; } - - /// - /// 订单编码. - /// - public string? orderCode { get; set; } - - /// - /// 付款方式. - /// - public string? paymentMode { get; set; } - - /// - /// 付款金额. - /// - public decimal? receivableMoney { get; set; } - - /// - /// 定金比率. - /// - public string? earnestRate { get; set; } - - /// - /// 预付定金. - /// - public string? prepayEarnest { get; set; } - - /// - /// 运输方式. - /// - public string? transportMode { get; set; } - - /// - /// 发货日期. - /// - public DateTime? deliveryDate { get; set; } - - /// - /// 发货地址. - /// - public string? deliveryAddress { get; set; } - - /// - /// 相关附近. - /// - public string? fileJson { get; set; } - - /// - /// 客户ID. - /// - public string? customerId { get; set; } - - /// - /// 业务人员名字. - /// - public string? salesmanName { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } - - /// - /// id. - /// - public string? id { get; set; } - - /// - /// 候选人. - /// - public Dictionary> candidateList { get; set; } - - /// - /// 选择分支. - /// - public List branchList { get; set; } = new List(); - - /// - /// 异常审批人. - /// - public Dictionary> errorRuleUserList { get; set; } = new Dictionary>(); -} - -/// -/// 商品明细. -/// -public class GoodsList -{ - /// - /// 商品id. - /// - public string? goodsId { get; set; } - - /// - /// 商品名称. - /// - public string? goodsName { get; set; } - - /// - /// 规格型号. - /// - public string? specifications { get; set; } - - /// - /// 单位. - /// - public string? unit { get; set; } - - /// - /// 数量. - /// - public decimal? qty { get; set; } - - /// - /// 单价. - /// - public string? price { get; set; } - - /// - /// 金额. - /// - public string? amount { get; set; } - - /// - /// 折扣. - /// - public decimal? discount { get; set; } - - /// - /// 税率. - /// - public decimal? cess { get; set; } - - /// - /// 实际单价. - /// - public string? actualPrice { get; set; } - - /// - /// 实际金额. - /// - public string? actualAmount { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } -} - -/// -/// 收款明细. -/// -[SuppressSniffer] -public class CollectionPlanList -{ - /// - /// 收款日期. - /// - public DateTime? receivableDate { get; set; } - - /// - /// 收款比率. - /// - public decimal? receivableRate { get; set; } - - /// - /// 收款金额. - /// - public string? receivableMoney { get; set; } - - /// - /// 收款方式. - /// - public string? receivableMode { get; set; } - - /// - /// 收款摘要. - /// - [JsonProperty("abstract")] - public string? abstracts { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderCustomerOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderCustomerOutput.cs deleted file mode 100644 index 1674e142..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderCustomerOutput.cs +++ /dev/null @@ -1,26 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 获取客户列表. -/// -[SuppressSniffer] -public class OrderCustomerOutput -{ - /// - /// 主键ID. - /// - public string? id { get; set; } - - /// - /// 企业名称. - /// - public string? text { get; set; } - - /// - /// 编码. - /// - public string? code { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderGoodsOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderGoodsOutput.cs deleted file mode 100644 index 74542fbc..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderGoodsOutput.cs +++ /dev/null @@ -1,40 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 获取商品列表. -/// -[SuppressSniffer] -public class OrderGoodsOutput -{ - /// - /// 主键ID. - /// - public string? id { get; set; } - - /// - /// 商品名称. - /// - public string? text { get; set; } - - /// - /// 商品编码. - /// - public string? code { get; set; } - - /// - /// 规格型号. - /// - public string? specifications { get; set; } - - /// - /// 单位. - /// - public string? unit { get; set; } - - /// - /// 售价. - /// - public double price { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderInfoOutput.cs deleted file mode 100644 index c5f834cc..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderInfoOutput.cs +++ /dev/null @@ -1,126 +0,0 @@ -using JNPF.DependencyInjection; -using JNPF.Extend.Entitys.Model; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 获取/查看订单信息. -/// -[SuppressSniffer] -public class OrderInfoOutput -{ - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } - - /// - /// 创建人. - /// - public string? creatorUserId { get; set; } - - /// - /// 客户id. - /// - public string? customerId { get; set; } - - /// - /// 客户名. - /// - public string? customerName { get; set; } - - /// - /// 交易地点. - /// - public string? deliveryAddress { get; set; } - - /// - /// 交易时间. - /// - public DateTime? deliveryDate { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } - - /// - /// 定金比率. - /// - public string? earnestRate { get; set; } - - /// - /// 状态. - /// - public int? enabledMark { get; set; } - - /// - /// 相关附件. - /// - public string? fileJson { get; set; } - - /// - /// id. - /// - public string? id { get; set; } - - /// - /// 修改时间. - /// - public DateTime? lastModifyTime { get; set; } - - /// - /// 修改人. - /// - public string? lastModifyUserId { get; set; } - - /// - /// 订单编码. - /// - public string? orderCode { get; set; } - - /// - /// 订单日期. - /// - public DateTime? orderDate { get; set; } - - /// - /// 付款方式. - /// - public string? paymentMode { get; set; } - - /// - /// 预付定金. - /// - public string? prepayEarnest { get; set; } - - /// - /// 付款金额. - /// - public decimal? receivableMoney { get; set; } - - /// - /// 业务人id. - /// - public string? salesmanId { get; set; } - - /// - /// 业务人名. - /// - public string? salesmanName { get; set; } - - /// - /// 运输方式. - /// - public string? transportMode { get; set; } - - /// - /// 订单商品. - /// - public List? goodsList { get; set; } - - /// - /// 收款计划. - /// - public List? collectionPlanList { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderItemsOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderItemsOutput.cs deleted file mode 100644 index 6490db3f..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderItemsOutput.cs +++ /dev/null @@ -1,70 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 获取订单列表-订单商品. -/// -[SuppressSniffer] -public class OrderItemsOutput -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 商品名称. - /// - public string? goodsName { get; set; } - - /// - /// 规格型号. - /// - public string? specifications { get; set; } - - /// - /// 单位. - /// - public string? unit { get; set; } - - /// - /// 数量. - /// - public decimal? qty { get; set; } - - /// - /// 单价. - /// - public decimal? price { get; set; } - - /// - /// 金额. - /// - public decimal? amount { get; set; } - - /// - /// 折扣. - /// - public decimal? discount { get; set; } - - /// - /// 税率. - /// - public decimal? cess { get; set; } - - /// - /// 实际单价. - /// - public decimal? actualPrice { get; set; } - - /// - /// 实际金额. - /// - public decimal? actualAmount { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderListOutput.cs deleted file mode 100644 index 39ba8ace..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderListOutput.cs +++ /dev/null @@ -1,75 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 获取订单列表(带分页). -/// -[SuppressSniffer] -public class OrderListOutput -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 订单编码. - /// - public string? orderCode { get; set; } - - /// - /// 订单日期. - /// - public DateTime? orderDate { get; set; } - - /// - /// 客户名称. - /// - public string? customerName { get; set; } - - /// - /// 业务人员. - /// - public string? salesmanName { get; set; } - - /// - /// 付款金额. - /// - public decimal? receivableMoney { get; set; } - - /// - /// 制单人员. - /// - public string? creatorUser { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } - - /// - /// 状态. - /// - public int? currentState { get; set; } - - /// - /// 创建人. - /// - public string? creatorUserId { get; set; } - - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } - - /// - /// 修改时间. - /// - public DateTime? lastModifyTime { get; set; } - - /// - /// 排序码. - /// - public long? sortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderListQuery.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderListQuery.cs deleted file mode 100644 index 939f4362..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderListQuery.cs +++ /dev/null @@ -1,27 +0,0 @@ -using JNPF.Common.Filter; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 获取订单列表入参(带分页). -/// -[SuppressSniffer] -public class OrderListQuery : PageInputBase -{ - /// - /// 开始时间. - /// - public long? startTime { get; set; } - - /// - /// 结束时间. - /// - public long? endTime { get; set; } - - /// - /// 状态. - /// - public int? enabledMark { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Order/OrderUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/Order/OrderUpInput.cs deleted file mode 100644 index 2cfd33a0..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Order/OrderUpInput.cs +++ /dev/null @@ -1,144 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Order; - -/// -/// 修改订单. -/// -[SuppressSniffer] -public class OrderUpInput -{ - /// - /// 客户名称. - /// - public string? customerName { get; set; } - - /// - /// 业务人员id. - /// - public string? salesmanId { get; set; } - - /// - /// 订单日期. - /// - public DateTime? orderDate { get; set; } - - /// - /// 订单编码. - /// - public string? orderCode { get; set; } - - /// - /// 付款方式. - /// - public string? paymentMode { get; set; } - - /// - /// 付款金额. - /// - public decimal? receivableMoney { get; set; } - - /// - /// 定金比率. - /// - public decimal? earnestRate { get; set; } - - /// - /// 预付定金. - /// - public decimal? prepayEarnest { get; set; } - - /// - /// 运输方式. - /// - public string? transportMode { get; set; } - - /// - /// 发货日期. - /// - public DateTime? deliveryDate { get; set; } - - /// - /// 发货地址. - /// - public string? deliveryAddress { get; set; } - - /// - /// 相关附近. - /// - public string? fileJson { get; set; } - - /// - /// 客户ID. - /// - public string? customerId { get; set; } - - /// - /// 业务人员名字. - /// - public string? salesmanName { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } - - /// - /// id. - /// - public string? id { get; set; } - - /// - /// 状态. - /// - public string? status { get; set; } - - /// - /// 紧急程度. - /// - public int? flowUrgent { get; set; } = 1; - - /// - /// 商品列表. - /// - public List? goodsList { get; set; } - - /// - /// 收款计划列表. - /// - public List? collectionPlanList { get; set; } -} - -/// -/// 商品列表. -/// -[SuppressSniffer] -public class GoodsListUp : GoodsList -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 商品id. - /// - public string? orderId { get; set; } -} - -/// -/// 收款计划列表. -/// -[SuppressSniffer] -public class CollectionPlanListUp : CollectionPlanList -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 商品id. - /// - public string? orderId { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Product/ProductCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/Product/ProductCrInput.cs deleted file mode 100644 index 01038191..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Product/ProductCrInput.cs +++ /dev/null @@ -1,111 +0,0 @@ -using JNPF.DependencyInjection; -using JNPF.Extend.Entitys.Dto.ProductEntry; - -namespace JNPF.Extend.Entitys.Dto.Product; - -/// -/// 新建销售订单. -/// -[SuppressSniffer] -public class ProductCrInput -{ - /// - /// 订单编号. - /// - public string code { get; set; } - - /// - /// 客户id. - /// - public string customerId { get; set; } - - /// - /// 客户名称. - /// - public string customerName { get; set; } - - /// - /// 审核人. - /// - public string auditName { get; set; } - - /// - /// 审核日期. - /// - public DateTime? auditDate { get; set; } - - /// - /// 发货仓库. - /// - public string goodsWarehouse { get; set; } - - /// - /// 发货通知时间. - /// - public DateTime? goodsDate { get; set; } - - /// - /// 发货通知人. - /// - public string goodsName { get; set; } - - /// - /// 收款方式. - /// - public string gatheringType { get; set; } - - /// - /// 业务员. - /// - public string business { get; set; } - - /// - /// 送货地址. - /// - public string address { get; set; } - - /// - /// 联系方式. - /// - public string contactTel { get; set; } - - /// - /// 收货消息. - /// - public int harvestMsg { get; set; } - - /// - /// 收货仓库. - /// - public string harvestWarehouse { get; set; } - - /// - /// 代发客户. - /// - public string issuingName { get; set; } - - /// - /// 让利金额. - /// - public decimal? partPrice { get; set; } - - /// - /// 优惠金额. - /// - public decimal? reducedPrice { get; set; } - - /// - /// 折后金额. - /// - public decimal? discountPrice { get; set; } - - /// - /// 备注. - /// - public string description { get; set; } - - /// - /// 子表数据. - /// - public List productEntryList { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/Product/ProductInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Product/ProductInfoOutput.cs deleted file mode 100644 index 1976c821..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Product/ProductInfoOutput.cs +++ /dev/null @@ -1,116 +0,0 @@ -using JNPF.DependencyInjection; -using JNPF.Extend.Entitys.Dto.ProductEntry; - -namespace JNPF.Extend.Entitys.Dto.Product; - -/// -/// 销售订单信息. -/// -[SuppressSniffer] -public class ProductInfoOutput -{ - /// - /// 主键. - /// - public string id { get; set; } - - /// - /// 订单编号. - /// - public string code { get; set; } - - /// - /// 客户id. - /// - public string customerId { get; set; } - - /// - /// 客户名称. - /// - public string customerName { get; set; } - - /// - /// 审核人. - /// - public string auditName { get; set; } - - /// - /// 审核日期. - /// - public DateTime? auditDate { get; set; } - - /// - /// 发货仓库. - /// - public string goodsWarehouse { get; set; } - - /// - /// 发货通知时间. - /// - public DateTime? goodsDate { get; set; } - - /// - /// 发货通知人. - /// - public string goodsName { get; set; } - - /// - /// 收款方式. - /// - public string gatheringType { get; set; } - - /// - /// 业务员. - /// - public string business { get; set; } - - /// - /// 送货地址. - /// - public string address { get; set; } - - /// - /// 联系方式. - /// - public string contactTel { get; set; } - - /// - /// 收货消息. - /// - public int harvestMsg { get; set; } - - /// - /// 收货仓库. - /// - public string harvestWarehouse { get; set; } - - /// - /// 代发客户. - /// - public string issuingName { get; set; } - - /// - /// 让利金额. - /// - public decimal? partPrice { get; set; } - - /// - /// 优惠金额. - /// - public decimal? reducedPrice { get; set; } - - /// - /// 折后金额. - /// - public decimal? discountPrice { get; set; } - - /// - /// 备注. - /// - public string description { get; set; } - - /// - /// 子表数据. - /// - public List productEntryList; -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/Product/ProductListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Product/ProductListOutput.cs deleted file mode 100644 index 0dc6fa52..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Product/ProductListOutput.cs +++ /dev/null @@ -1,75 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Product; - -/// -/// 销售订单列表. -/// -[SuppressSniffer] -public class ProductListOutput -{ - /// - /// 主键. - /// - public string id { get; set; } - - /// - /// 订单编号. - /// - public string code { get; set; } - - /// - /// 客户名称. - /// - public string customerName { get; set; } - - /// - /// 业务员. - /// - public string business { get; set; } - - /// - /// 送货地址 - /// - public string address { get; set; } - - /// - /// 联系方式. - /// - public string contactTel { get; set; } - - /// - /// 制单人. - /// - public string salesmanName { get; set; } - - /// - /// 审核状态. - /// - public int auditState { get; set; } - - /// - /// 发货状态. - /// - public int goodsState { get; set; } - - /// - /// 关闭状态. - /// - public int closeState { get; set; } - - /// - /// 关闭日期. - /// - public DateTime? closeDate { get; set; } - - /// - /// 联系人. - /// - public string contactName { get; set; } - - /// - /// 子表数据. - /// - public List productEntryList { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/Product/ProductListQueryInput.cs b/extend/Tnb.Extend.Entitys/Dto/Product/ProductListQueryInput.cs deleted file mode 100644 index 6e8561c7..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Product/ProductListQueryInput.cs +++ /dev/null @@ -1,41 +0,0 @@ -using JNPF.Common.Filter; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Product; - -/// -/// 销售订单列表. -/// -[SuppressSniffer] -public class ProductListQueryInput : PageInputBase -{ - /// - /// 订单编号. - /// - public string code { get; set; } - - /// - /// 客户名称. - /// - public string customerName { get; set; } - - /// - /// 联系方式. - /// - public string contactTel { get; set; } - - /// - /// 审核状态. - /// - public string auditState { get; set; } - - /// - /// 关闭状态. - /// - public string closeState { get; set; } - - /// - /// 制单人. - /// - public string creatorUser { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/Product/ProductUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/Product/ProductUpInput.cs deleted file mode 100644 index 447000af..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Product/ProductUpInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Product; - -/// -/// 订单示例更新输入. -/// -[SuppressSniffer] -public class ProductUpInput : ProductCrInput -{ - /// - /// . - /// - public string id { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyCrInput.cs deleted file mode 100644 index 693b5643..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyCrInput.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProductClassify; - -/// -/// 产品分类. -/// -[SuppressSniffer] -public class ProductClassifyCrInput -{ - /// - /// 名称. - /// - public string? fullName { get; set; } - - /// - /// 上级. - /// - public string? parentId { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyInfoOutput.cs deleted file mode 100644 index 62c6e8d1..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyInfoOutput.cs +++ /dev/null @@ -1,25 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProductClassify; - -/// -/// 产品分类. -/// -[SuppressSniffer] -public class ProductClassifyInfoOutput -{ - /// - /// 自然主键. - /// - public string id { get; set; } - - /// - /// 名称. - /// - public string fullName { get; set; } - - /// - /// 上级. - /// - public string parentId { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyTreeOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyTreeOutput.cs deleted file mode 100644 index 5fb2a941..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyTreeOutput.cs +++ /dev/null @@ -1,17 +0,0 @@ -using JNPF.Common.Security; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProductClassify; - -/// -/// 产品分类. -/// -[SuppressSniffer] -public class ProductClassifyTreeOutput : TreeModel -{ - /// - /// 名称. - /// - /// - public string fullName { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyUpInput.cs deleted file mode 100644 index 4db3889b..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductClassify/ProductClassifyUpInput.cs +++ /dev/null @@ -1,12 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProductClassify; - -/// -/// 产品分类. -/// -[SuppressSniffer] -public class ProductClassifyUpInput : ProductClassifyCrInput -{ - public string id { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductCustomer/ProductCustomerListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductCustomer/ProductCustomerListOutput.cs deleted file mode 100644 index 21aa8fdc..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductCustomer/ProductCustomerListOutput.cs +++ /dev/null @@ -1,41 +0,0 @@ -using JNPF.DependencyInjection; -using SqlSugar; - -namespace JNPF.Extend.Entitys.Dto.Customer; - -/// -/// 客户信息. -/// -[SuppressSniffer] -public class ProductCustomerListOutput -{ - /// - /// 主键. - /// - public string id { get; set; } - - /// - /// 客户编号. - /// - public string code { get; set; } - - /// - /// 客户名称. - /// - public string customerName { get; set; } - - /// - /// 地址. - /// - public string address { get; set; } - - /// - /// 名称. - /// - public string name { get; set; } - - /// - /// 联系方式. - /// - public string contactTel { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductEntry/ProductEntryCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductEntry/ProductEntryCrInput.cs deleted file mode 100644 index a9462b1f..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductEntry/ProductEntryCrInput.cs +++ /dev/null @@ -1,60 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProductEntry; - -/// -/// 新建产品明细. -/// -[SuppressSniffer] -public class ProductEntryCrInput -{ - /// - /// 主键. - /// - public string? id { get; set; } - - /// - /// 产品编号. - /// - public string productCode { get; set; } - - /// - /// 产品名称. - /// - public string productName { get; set; } - - /// - /// 产品规格. - /// - public string productSpecification { get; set; } - - /// - /// 数量. - /// - public int qty { get; set; } - - /// - /// 订货类型. - /// - public string type { get; set; } - - /// - /// 单价. - /// - public decimal money { get; set; } - - /// - /// 折后单价. - /// - public decimal price { get; set; } - - /// - /// 金额. - /// - public decimal amount { get; set; } - - /// - /// 备注. - /// - public string description { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductEntry/ProductEntryInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductEntry/ProductEntryInfoOutput.cs deleted file mode 100644 index 810e75c6..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductEntry/ProductEntryInfoOutput.cs +++ /dev/null @@ -1,60 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProductEntry; - -/// -/// 销售订单信息. -/// -[SuppressSniffer] -public class ProductEntryInfoOutput -{ - /// - /// 主键. - /// - public string id { get; set; } - - /// - /// 产品编号. - /// - public string productCode { get; set; } - - /// - /// 产品名称. - /// - public string productName { get; set; } - - /// - /// 产品规格. - /// - public string productSpecification { get; set; } - - /// - /// 数量. - /// - public int qty { get; set; } - - /// - /// 订货类型. - /// - public string type { get; set; } - - /// - /// 单价. - /// - public decimal money { get; set; } - - /// - /// 折后单价. - /// - public decimal price { get; set; } - - /// - /// 金额. - /// - public decimal amount { get; set; } - - /// - /// 备注. - /// - public string description { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductEntry/ProductEntryListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductEntry/ProductEntryListOutput.cs deleted file mode 100644 index a87a5acc..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductEntry/ProductEntryListOutput.cs +++ /dev/null @@ -1,41 +0,0 @@ -using JNPF.DependencyInjection; -using JNPF.Extend.Entitys.Model; - -namespace JNPF.Extend.Entitys.Dto.ProductEntry; - -/// -/// -/// -[SuppressSniffer] -public class ProductEntryListOutput -{ - /// - /// 产品编号. - /// - public string productCode { get; set; } - - /// - /// 产品名称. - /// - public string productName { get; set; } - - /// - /// 数量. - /// - public int qty { get; set; } - - /// - /// 订货类型. - /// - public string type { get; set; } - - /// - /// 活动. - /// - public string activity { get; set; } - - /// - /// 数据. - /// - public List dataList { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductGoods/ProductGoodsListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductGoods/ProductGoodsListOutput.cs deleted file mode 100644 index 83266e20..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductGoods/ProductGoodsListOutput.cs +++ /dev/null @@ -1,50 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProductGoods; - -/// -/// 产品列表. -/// -[SuppressSniffer] -public class ProductGoodsListOutput -{ - /// - /// 主键. - /// - public string id { get; set; } - - /// - /// 分类主键. - /// - public string classifyId { get; set; } - - /// - /// 订单编号. - /// - public string code { get; set; } - - /// - /// 订单名称. - /// - public string fullName { get; set; } - - /// - /// 订单名称. - /// - public int qty { get; set; } - - /// - /// 订货类型. - /// - public string type { get; set; } - - /// - /// 金额. - /// - public string amount { get; set; } - - /// - /// 单价. - /// - public string money { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Dto/ProductGoods/ProductGoodsListQueryInput.cs b/extend/Tnb.Extend.Entitys/Dto/ProductGoods/ProductGoodsListQueryInput.cs deleted file mode 100644 index 24999ed2..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProductGoods/ProductGoodsListQueryInput.cs +++ /dev/null @@ -1,26 +0,0 @@ -using JNPF.Common.Filter; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProductGoods; - -/// -/// 产品列表. -/// -[SuppressSniffer] -public class ProductGoodsListQueryInput : PageInputBase -{ - /// - /// 订单编号. - /// - public string code { get; set; } - - /// - /// 产品名称. - /// - public string fullName { get; set; } - - /// - /// 分类ID. - /// - public string classifyId { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttCrInput.cs deleted file mode 100644 index f68c33f3..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttCrInput.cs +++ /dev/null @@ -1,55 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProjectGantt; - -/// -/// 添加项目. -/// -[SuppressSniffer] -public class ProjectGanttCrInput -{ - /// - /// 项目编码. - /// - public string? enCode { get; set; } - - /// - /// 项目状态(1-进行中,2-已暂停). - /// - public int? state { get; set; } - - /// - /// 开始时间. - /// - public DateTime? startTime { get; set; } - - /// - /// 完成进度. - /// - public double? schedule { get; set; } - - /// - /// 项目工期. - /// - public int? timeLimit { get; set; } - - /// - /// 项目名称. - /// - public string? fullName { get; set; } - - /// - /// 结束时间. - /// - public DateTime? endTime { get; set; } - - /// - /// 参与人员. - /// - public string? managerIds { get; set; } - - /// - /// 项目描述. - /// - public string? description { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttInfoOutput.cs deleted file mode 100644 index 8b79f465..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttInfoOutput.cs +++ /dev/null @@ -1,11 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProjectGantt; - -/// -/// 获取项目信息. -/// -[SuppressSniffer] -public class ProjectGanttInfoOutput : ProjectGanttUpInput -{ -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttListOutput.cs deleted file mode 100644 index b48cf3fa..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttListOutput.cs +++ /dev/null @@ -1,77 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProjectGantt; - -/// -/// 获取项目管理列表(带分页). -/// -[SuppressSniffer] -public class ProjectGanttListOutput -{ - /// - /// 项目编码. - /// - public string? enCode { get; set; } - - /// - /// 项目状态(1-进行中,2-已暂停). - /// - public int? state { get; set; } - - /// - /// 开始时间. - /// - public DateTime? startTime { get; set; } - - /// - /// 完成进度. - /// - public int? schedule { get; set; } - - /// - /// 项目工期. - /// - public double timeLimit { get; set; } - - /// - /// 项目名称. - /// - public string? fullName { get; set; } - - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 结束时间. - /// - public DateTime? endTime { get; set; } - - /// - /// 参加人员. - /// - public string? managerIds { get; set; } - - /// - /// 参加人员信息. - /// - public List managersInfo { get; set; } = new List(); -} - -/// -/// 参加人员信息. -/// -public class ManagersInfo -{ - /// - /// 账号+名字. - /// - public string? account { get; set; } - - /// - /// 用户头像. - /// - public string? headIcon { get; set; } -} - diff --git a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskCrInput.cs deleted file mode 100644 index 41241be9..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskCrInput.cs +++ /dev/null @@ -1,65 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProjectGantt; - -/// -/// 添加项目任务. -/// -[SuppressSniffer] -public class ProjectGanttTaskCrInput -{ - /// - /// 上级id. - /// - public string? parentId { get; set; } - - /// - /// 开始时间. - /// - public DateTime? startTime { get; set; } - - /// - /// 完成进度. - /// - public decimal? schedule { get; set; } - - /// - /// 完成进度. - /// - public decimal? timeLimit { get; set; } - - /// - /// 任务名称. - /// - public string? fullName { get; set; } - - /// - /// 结束时间. - /// - public DateTime? endTime { get; set; } - - /// - /// 参与人员. - /// - public string? managerIds { get; set; } - - /// - /// 标记颜色. - /// - public string? signColor { get; set; } - - /// - /// 标记. - /// - public string? sign { get; set; } - - /// - /// 项目id. - /// - public string? projectId { get; set; } - - /// - /// 任务描述. - /// - public string? description { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskInfoOutput.cs deleted file mode 100644 index e36c39f5..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskInfoOutput.cs +++ /dev/null @@ -1,11 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProjectGantt; - -/// -/// 获取项目任务信息. -/// -[SuppressSniffer] -public class ProjectGanttTaskInfoOutput : ProjectGanttTaskUpInput -{ -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskListOutput.cs deleted file mode 100644 index aa5c5009..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskListOutput.cs +++ /dev/null @@ -1,43 +0,0 @@ -using JNPF.Common.Security; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProjectGantt; - -/// -/// 获取项目任务列表. -/// -[SuppressSniffer] -public class ProjectGanttTaskListOutput : TreeModel -{ - - /// - /// 任务名称. - /// - public string? fullName { get; set; } - - /// - /// 标记. - /// - public string? sign { get; set; } - - /// - /// 标记颜色. - /// - public string? signColor { get; set; } - - /// - /// 开始时间. - /// - public DateTime? startTime { get; set; } - - /// - /// 结束时间. - /// - public DateTime? endTime { get; set; } - - /// - /// 完成进度. - /// - public int? schedule { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskTreeViewOutput.cs b/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskTreeViewOutput.cs deleted file mode 100644 index 77e38edd..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskTreeViewOutput.cs +++ /dev/null @@ -1,46 +0,0 @@ -using JNPF.Common.Security; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProjectGantt; - -/// -/// 获取项目任务树形. -/// -[SuppressSniffer] -public class ProjectGanttTaskTreeViewOutput : TreeModel -{ - /// - /// 结束时间. - /// - public DateTime? endTime { get; set; } - - /// - /// 开始时间. - /// - public DateTime? startTime { get; set; } - - /// - /// 项目名称. - /// - public string? fullName { get; set; } - - /// - /// 完成度. - /// - public int? schedule { get; set; } - - /// - /// 项目id. - /// - public string? projectId { get; set; } - - /// - /// 标记颜色. - /// - public string? signColor { get; set; } - - /// - /// 标记. - /// - public string? sign { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskUpInput.cs deleted file mode 100644 index 8cae141f..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttTaskUpInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProjectGantt; - -/// -/// 修改项目任务. -/// -[SuppressSniffer] -public class ProjectGanttTaskUpInput : ProjectGanttTaskCrInput -{ - /// - /// 主键id. - /// - public string? id { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttUpInput.cs deleted file mode 100644 index 231d65de..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/ProjectGantt/ProjectGanttUpInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.ProjectGantt; - -/// -/// 修改项目. -/// -[SuppressSniffer] -public class ProjectGanttUpInput : ProjectGanttCrInput -{ - /// - /// 项目id. - /// - public string? id { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleCrInput.cs deleted file mode 100644 index 307a0936..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleCrInput.cs +++ /dev/null @@ -1,60 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Schedule; - -/// -/// 新建日程安排. -/// -[SuppressSniffer] -public class ScheduleCrInput -{ - /// - /// 开始时间. - /// - public DateTime? startTime { get; set; } - - /// - /// 结束时间. - /// - public DateTime? endTime { get; set; } - - /// - /// 日程内容. - /// - public string? content { get; set; } - - /// - /// 微信提醒(1-提醒,0-不提醒). - /// - public int? weChatAlert { get; set; } - - /// - /// 邮件提醒(1-提醒,0-不提醒). - /// - public int? mailAlert { get; set; } - - /// - /// 短信提醒(1-提醒,0-不提醒). - /// - public int? mobileAlert { get; set; } - - /// - /// APP提醒(1-提醒,0-不提醒). - /// - public int? appAlert { get; set; } - - /// - /// 提醒设置. - /// - public int? early { get; set; } - - /// - /// 日程颜色. - /// - public string? colour { get; set; } - - /// - /// 颜色样式. - /// - public string? colourCss { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleInfoOutput.cs deleted file mode 100644 index 9092361c..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleInfoOutput.cs +++ /dev/null @@ -1,65 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Schedule; - -/// -/// 获取日程安排信息. -/// -[SuppressSniffer] -public class ScheduleInfoOutput -{ - /// - /// APP提醒. - /// - public int? appAlert { get; set; } - - /// - /// 日程颜色. - /// - public string? colour { get; set; } - - /// - /// 颜色样式. - /// - public string? colourCss { get; set; } - - /// - /// 日程内容. - /// - public string? content { get; set; } - - /// - /// 提醒设置. - /// - public int? early { get; set; } - - /// - /// 结束时间. - /// - public DateTime? endTime { get; set; } - - /// - /// 日程主键. - /// - public string? id { get; set; } - - /// - /// 邮件提醒. - /// - public int? mailAlert { get; set; } - - /// - /// 短信提醒. - /// - public int? mobileAlert { get; set; } - - /// - /// 开始时间. - /// - public DateTime? startTime { get; set; } - - /// - /// 微信提醒. - /// - public int? weChatAlert { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleListOutput.cs deleted file mode 100644 index e831ed0a..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleListOutput.cs +++ /dev/null @@ -1,35 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Schedule; - -/// -/// 获取日程安排列表. -/// -[SuppressSniffer] -public class ScheduleListOutput -{ - /// - /// 日程内容. - /// - public string? content { get; set; } - - /// - /// 开始时间. - /// - public DateTime? startTime { get; set; } - - /// - /// 结束时间. - /// - public DateTime? endTime { get; set; } - - /// - /// 颜色. - /// - public string? colour { get; set; } - - /// - /// 主键id. - /// - public string? id { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleListQuery.cs b/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleListQuery.cs deleted file mode 100644 index f53f753e..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleListQuery.cs +++ /dev/null @@ -1,27 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Schedule; - -/// -/// 获取日程安排列表入参. -/// -[SuppressSniffer] -public class ScheduleListQuery -{ - - /// - /// 开始时间. - /// - public string? startTime { get; set; } - - /// - /// 结束时间. - /// - public string? endTime { get; set; } - - /// - /// 时间. - /// - public string? dateTime { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleUpInput.cs deleted file mode 100644 index c053f7e4..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/Schedule/ScheduleUpInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.Schedule; - -/// -/// 更新日程安排. -/// -[SuppressSniffer] -public class ScheduleUpInput : ScheduleCrInput -{ - /// - /// 主键id. - /// - public string? id { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleAllOutput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleAllOutput.cs deleted file mode 100644 index 3409c782..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleAllOutput.cs +++ /dev/null @@ -1,85 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 获取表格分组列表. -/// -[SuppressSniffer] -public class TableExampleAllOutput -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 项目名称. - /// - public string? projectName { get; set; } - - /// - /// 项目编码. - /// - public string? projectCode { get; set; } - - /// - /// 项目类型名称. - /// - public string? projectType { get; set; } - - /// - /// 项目阶段. - /// - public string? projectPhase { get; set; } - - /// - /// 客户名称. - /// - public string? customerName { get; set; } - - /// - /// 负责人. - /// - public string? principal { get; set; } - - /// - /// 立项人. - /// - public string? jackStands { get; set; } - - /// - /// 交付时间. - /// - public DateTime? interactionDate { get; set; } - - /// - /// 费用金额. - /// - public decimal? costAmount { get; set; } - - /// - /// 已用金额. - /// - public decimal? tunesAmount { get; set; } - - /// - /// 预计收入. - /// - public decimal? projectedIncome { get; set; } - - /// - /// 登记人. - /// - public string? registrant { get; set; } - - /// - /// 登记时间. - /// - public DateTime? registerDate { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleCityListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleCityListOutput.cs deleted file mode 100644 index dd81f75e..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleCityListOutput.cs +++ /dev/null @@ -1,31 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 获取城市信息列表. -/// -[SuppressSniffer] -public class TableExampleCityListOutput -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 上级id. - /// - public string? parentId { get; set; } - - /// - /// 名称. - /// - public string? fullName { get; set; } - - /// - /// 编码. - /// - public string? enCode { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleCrInput.cs deleted file mode 100644 index 54532d24..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleCrInput.cs +++ /dev/null @@ -1,70 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 新建项目. -/// -[SuppressSniffer] -public class TableExampleCrInput -{ - /// - /// 项目名称. - /// - public string? projectName { get; set; } - - /// - /// 项目编码. - /// - public string? projectCode { get; set; } - - /// - /// 项目类型. - /// - public string? projectType { get; set; } - - /// - /// 项目阶段. - /// - public string? projectPhase { get; set; } - - /// - /// 客户名称. - /// - public string? customerName { get; set; } - - /// - /// 负责人. - /// - public string? principal { get; set; } - - /// - /// 立项人. - /// - public string? jackStands { get; set; } - - /// - /// 交付日期. - /// - public DateTime? interactionDate { get; set; } - - /// - /// 费用金额. - /// - public decimal? costAmount { get; set; } - - /// - /// 已用金额. - /// - public decimal? tunesAmount { get; set; } - - /// - /// 预计收入. - /// - public decimal? projectedIncome { get; set; } - - /// - /// 描述. - /// - public string? description { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleIndustryListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleIndustryListOutput.cs deleted file mode 100644 index 02574ff3..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleIndustryListOutput.cs +++ /dev/null @@ -1,35 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 获取延伸扩展列表. -/// -[SuppressSniffer] -public class TableExampleIndustryListOutput -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 上级id. - /// - public string? parentId { get; set; } - - /// - /// 名称. - /// - public string? fullName { get; set; } - - /// - /// 编码. - /// - public string? enCode { get; set; } - - /// - /// 是否为子集. - /// - public bool isLeaf { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleInfoOutput.cs deleted file mode 100644 index 98424f66..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleInfoOutput.cs +++ /dev/null @@ -1,11 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 获取普通表格示例信息. -/// -[SuppressSniffer] -public class TableExampleInfoOutput : TableExampleUpInput -{ -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleListOutput.cs deleted file mode 100644 index 1773638d..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleListOutput.cs +++ /dev/null @@ -1,101 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 获取表格数据列表(带分页). -/// -[SuppressSniffer] -public class TableExampleListOutput -{ - /// - /// 主键id. - /// - public string? id { get; set; } - - /// - /// 项目名称. - /// - public string? projectName { get; set; } - - /// - /// 项目编码. - /// - public string? projectCode { get; set; } - - /// - /// 项目类型名称. - /// - public string? projectType { get; set; } - - /// - /// 项目阶段. - /// - public string? projectPhase { get; set; } - - /// - /// 客户名称. - /// - public string? customerName { get; set; } - - /// - /// 负责人. - /// - public string? principal { get; set; } - - /// - /// 立项人. - /// - public string? jackStands { get; set; } - - /// - /// 交付时间. - /// - public DateTime? interactionDate { get; set; } - - /// - /// 费用金额. - /// - public decimal? costAmount { get; set; } - - /// - /// 已用金额. - /// - public decimal? tunesAmount { get; set; } - - /// - /// 预计收入. - /// - public decimal? projectedIncome { get; set; } - - /// - /// 登记人. - /// - public string? registrant { get; set; } - - /// - /// 登记时间. - /// - public DateTime? registerDate { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } - - /// - /// 批注. - /// - public string? postilJson { get; set; } - - /// - /// 标志. - /// - public string? sign { get; set; } - - /// - /// 批注条数. - /// - public string? postilCount { get; set; } - -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExamplePostilSendInput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExamplePostilSendInput.cs deleted file mode 100644 index c56a1dbb..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExamplePostilSendInput.cs +++ /dev/null @@ -1,12 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -[SuppressSniffer] -public class TableExamplePostilSendInput -{ - /// - /// 批注内容. - /// - public string? text { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleRowUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleRowUpInput.cs deleted file mode 100644 index 0616e6b7..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleRowUpInput.cs +++ /dev/null @@ -1,75 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 新建项目. -/// -[SuppressSniffer] -public class TableExampleRowUpInput -{ - /// - /// 项目名称. - /// - public string? projectName { get; set; } - - /// - /// 项目编码. - /// - public string? projectCode { get; set; } - - /// - /// 项目类型. - /// - public string? projectType { get; set; } - - /// - /// 项目阶段. - /// - public string? projectPhase { get; set; } - - /// - /// 客户名称. - /// - public string? customerName { get; set; } - - /// - /// 负责人. - /// - public string? principal { get; set; } - - /// - /// 立项人. - /// - public string? jackStands { get; set; } - - /// - /// 交付日期. - /// - public DateTime? interactionDate { get; set; } - - /// - /// 费用金额. - /// - public decimal? costAmount { get; set; } - - /// - /// 已用金额. - /// - public decimal? tunesAmount { get; set; } - - /// - /// 预计收入. - /// - public decimal? projectedIncome { get; set; } - - /// - /// 描述. - /// - public string? description { get; set; } - - /// - /// - /// - public string? oper { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleSignUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleSignUpInput.cs deleted file mode 100644 index 5dcb6354..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleSignUpInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 更新项目. -/// -[SuppressSniffer] -public class TableExampleSignUpInput -{ - /// - /// 主键id. - /// - public string? sign { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleTreeListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleTreeListOutput.cs deleted file mode 100644 index ed2882df..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleTreeListOutput.cs +++ /dev/null @@ -1,31 +0,0 @@ -using JNPF.Common.Security; -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 表格树形. -/// -[SuppressSniffer] -public class TableExampleTreeListOutput : TreeModel -{ - /// - /// - /// - public bool loaded { get; set; } - - /// - /// - /// - public bool expanded { get; set; } - - /// - /// - /// - public Dictionary ht { get; set; } - - /// - /// - /// - public string? text { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleUpInput.cs deleted file mode 100644 index f0a88c58..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/TableExample/TableExampleUpInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.TableExample; - -/// -/// 更新项目. -/// -[SuppressSniffer] -public class TableExampleUpInput : TableExampleCrInput -{ - /// - /// 主键id. - /// - public string? id { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogCrInput.cs b/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogCrInput.cs deleted file mode 100644 index bcf699ff..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogCrInput.cs +++ /dev/null @@ -1,40 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.WorkLog; - -/// -/// -/// -[SuppressSniffer] -public class WorkLogCrInput -{ - /// - /// 标题. - /// - public string? title { get; set; } - - /// - /// 问题内容. - /// - public string? question { get; set; } - - /// - /// 今日内容. - /// - public string? todayContent { get; set; } - - /// - /// 明日内容. - /// - public string? tomorrowContent { get; set; } - - /// - /// 接收人. - /// - public string? toUserId { get; set; } - - /// - /// 用户id. - /// - public string? userIds { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogInfoOutput.cs b/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogInfoOutput.cs deleted file mode 100644 index 42489cfc..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogInfoOutput.cs +++ /dev/null @@ -1,51 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.WorkLog; - -/// -/// -/// - -[SuppressSniffer] -public class WorkLogInfoOutput -{ - /// - /// id. - /// - public string? id { get; set; } - - /// - /// 标题. - /// - public string? title { get; set; } - - /// - /// 问题内容. - /// - public string? question { get; set; } - - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } - - /// - /// 今日内容. - /// - public string? todayContent { get; set; } - - /// - /// 明日内容. - /// - public string? tomorrowContent { get; set; } - - /// - /// 接收人. - /// - public string? toUserId { get; set; } - - /// - /// 用户id. - /// - public string? userIds { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogListOutput.cs b/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogListOutput.cs deleted file mode 100644 index 39661afd..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogListOutput.cs +++ /dev/null @@ -1,55 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Dto.WorkLog; - -/// -/// -/// -[SuppressSniffer] -public class WorkLogListOutput -{ - /// - /// id. - /// - public string? id { get; set; } - - /// - /// 标题. - /// - public string? title { get; set; } - - /// - /// 问题内容. - /// - public string? question { get; set; } - - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } - - /// - /// 今日内容. - /// - public string? todayContent { get; set; } - - /// - /// 明日内容. - /// - public string? tomorrowContent { get; set; } - - /// - /// 接收人. - /// - public string? toUserId { get; set; } - - /// - /// 修改时间. - /// - public DateTime? lastModifyTime { get; set; } - - /// - /// 排序码. - /// - public long? sortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogUpInput.cs b/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogUpInput.cs deleted file mode 100644 index 4b6f4da6..00000000 --- a/extend/Tnb.Extend.Entitys/Dto/WorkLog/WorkLogUpInput.cs +++ /dev/null @@ -1,16 +0,0 @@ -using JNPF.DependencyInjection; -using JNPF.Extend.Entitys.Dto.WorkLog; - -namespace JNPF.Extend.Entitys.Dto.WoekLog; - -/// -/// -/// -[SuppressSniffer] -public class WorkLogUpInput : WorkLogCrInput -{ - /// - /// id. - /// - public string? id { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/BigDataEntity.cs b/extend/Tnb.Extend.Entitys/Entity/BigDataEntity.cs deleted file mode 100644 index 7b29de88..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/BigDataEntity.cs +++ /dev/null @@ -1,40 +0,0 @@ -using JNPF.Common.Contracts; -using JNPF.Extras.DatabaseAccessor.SqlSugar.Models; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 大数据测试 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01. -/// -[SugarTable("EXT_BIGDATA")] -public class BigDataEntity : EntityBase -{ - /// - /// 编码. - /// - [SugarColumn(ColumnName = "F_ENCODE")] - public string? EnCode { get; set; } - - /// - /// 名称. - /// - [SugarColumn(ColumnName = "F_FULLNAME")] - public string? FullName { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 创建时间. - /// - [SugarColumn(ColumnName = "F_CREATORTIME")] - public DateTime? CreatorTime { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/DocumentEntity.cs b/extend/Tnb.Extend.Entitys/Entity/DocumentEntity.cs deleted file mode 100644 index f187c65d..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/DocumentEntity.cs +++ /dev/null @@ -1,87 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 知识文档 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01. -/// -[SugarTable("EXT_DOCUMENT")] -public class DocumentEntity : CLDEntityBase -{ - /// - /// 文档父级. - /// - [SugarColumn(ColumnName = "F_PARENTID")] - public string? ParentId { get; set; } - - /// - /// 文档分类:【0-文件夹、1-文件】. - /// - [SugarColumn(ColumnName = "F_TYPE")] - public int? Type { get; set; } - - /// - /// 文件名称. - /// - [SugarColumn(ColumnName = "F_FULLNAME")] - public string? FullName { get; set; } - - /// - /// 文件路径. - /// - [SugarColumn(ColumnName = "F_FILEPATH")] - public string? FilePath { get; set; } - - /// - /// 文件大小. - /// - [SugarColumn(ColumnName = "F_FILESIZE")] - public string? FileSize { get; set; } - - /// - /// 文件后缀. - /// - [SugarColumn(ColumnName = "F_FILEEXTENSION")] - public string? FileExtension { get; set; } - - /// - /// 阅读数量. - /// - [SugarColumn(ColumnName = "F_READCCOUNT")] - public int? ReadcCount { get; set; } - - /// - /// 是否共享. - /// - [SugarColumn(ColumnName = "F_ISSHARE")] - public int? IsShare { get; set; } - - /// - /// 共享时间. - /// - [SugarColumn(ColumnName = "F_SHARETIME")] - public DateTime? ShareTime { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } - - /// - /// 下载地址. - /// - [SugarColumn(ColumnName = "F_UPLOADERURL")] - public string? UploaderUrl { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/DocumentShareEntity.cs b/extend/Tnb.Extend.Entitys/Entity/DocumentShareEntity.cs deleted file mode 100644 index 6b2947c2..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/DocumentShareEntity.cs +++ /dev/null @@ -1,33 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 知识文档共享 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01 . -/// -[SugarTable("EXT_DOCUMENTSHARE")] -public class DocumentShareEntity : EntityBase -{ - /// - /// 文档主键. - /// - [SugarColumn(ColumnName = "F_DOCUMENTID")] - public string? DocumentId { get; set; } - - /// - /// 共享人员. - /// - [SugarColumn(ColumnName = "F_SHAREUSERID")] - public string? ShareUserId { get; set; } - - /// - /// 共享时间. - /// - [SugarColumn(ColumnName = "F_SHARETIME")] - public DateTime? ShareTime { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/EmailConfigEntity.cs b/extend/Tnb.Extend.Entitys/Entity/EmailConfigEntity.cs deleted file mode 100644 index 6610c764..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/EmailConfigEntity.cs +++ /dev/null @@ -1,87 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 邮件配置 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01. -/// -[SugarTable("EXT_EMAILCONFIG")] -public class EmailConfigEntity : CEntityBase -{ - /// - /// POP3服务. - /// - [SugarColumn(ColumnName = "F_POP3HOST")] - public string? POP3Host { get; set; } - - /// - /// POP3端口. - /// - [SugarColumn(ColumnName = "F_POP3PORT")] - public int? POP3Port { get; set; } - - /// - /// SMTP服务. - /// - [SugarColumn(ColumnName = "F_SMTPHOST")] - public string? SMTPHost { get; set; } - - /// - /// SMTP端口. - /// - [SugarColumn(ColumnName = "F_SMTPPORT")] - public int? SMTPPort { get; set; } - - /// - /// 账户. - /// - [SugarColumn(ColumnName = "F_ACCOUNT")] - public string? Account { get; set; } - - /// - /// 密码. - /// - [SugarColumn(ColumnName = "F_PASSWORD")] - public string? Password { get; set; } - - /// - /// SSL登录. - /// - [SugarColumn(ColumnName = "F_SSL")] - public int? Ssl { get; set; } - - /// - /// 发件人名称. - /// - [SugarColumn(ColumnName = "F_SENDERNAME")] - public string? SenderName { get; set; } - - /// - /// 我的文件夹. - /// - [SugarColumn(ColumnName = "F_FOLDERJSON")] - public string? FolderJson { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } - - /// - /// 有效标志. - /// - [SugarColumn(ColumnName = "F_ENABLEDMARK")] - public int? EnabledMark { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/EmailReceiveEntity.cs b/extend/Tnb.Extend.Entitys/Entity/EmailReceiveEntity.cs deleted file mode 100644 index c77b8034..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/EmailReceiveEntity.cs +++ /dev/null @@ -1,93 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 邮件接收 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01. -/// -[SugarTable("EXT_EMAILRECEIVE")] -public class EmailReceiveEntity : CLDEntityBase -{ - /// - /// 类型:【1-外部、0-内部】. - /// - [SugarColumn(ColumnName = "F_TYPE")] - public int? Type { get; set; } - - /// - /// 邮箱账户. - /// - [SugarColumn(ColumnName = "F_MACCOUNT")] - public string? MAccount { get; set; } - - /// - /// MID. - /// - [SugarColumn(ColumnName = "F_MID")] - public string? MID { get; set; } - - /// - /// 发件人. - /// - [SugarColumn(ColumnName = "F_SENDER")] - public string? Sender { get; set; } - - /// - /// 发件人名称. - /// - [SugarColumn(ColumnName = "F_SENDERNAME")] - public string? SenderName { get; set; } - - /// - /// 主题. - /// - [SugarColumn(ColumnName = "F_SUBJECT")] - public string? Subject { get; set; } - - /// - /// 正文. - /// - [SugarColumn(ColumnName = "F_BODYTEXT")] - public string? BodyText { get; set; } - - /// - /// 附件. - /// - [SugarColumn(ColumnName = "F_ATTACHMENT")] - public string? Attachment { get; set; } - - /// - /// 阅读. - /// - [SugarColumn(ColumnName = "F_READ")] - public int? Read { get; set; } - - /// - /// Date. - /// - [SugarColumn(ColumnName = "F_DATE")] - public DateTime? Date { get; set; } - - /// - /// 星标. - /// - [SugarColumn(ColumnName = "F_STARRED")] - public int? Starred { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/EmailSendEntity.cs b/extend/Tnb.Extend.Entitys/Entity/EmailSendEntity.cs deleted file mode 100644 index 555ddb97..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/EmailSendEntity.cs +++ /dev/null @@ -1,87 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 邮件发送 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01 . -/// -[SugarTable("EXT_EMAILSEND")] -public class EmailSendEntity : CLDEntityBase -{ - /// - /// 类型:【1-外部、0-内部】. - /// - [SugarColumn(ColumnName = "F_TYPE")] - public int? Type { get; set; } - - /// - /// 发件人. - /// - [SugarColumn(ColumnName = "F_SENDER")] - public string? Sender { get; set; } - - /// - /// 收件人. - /// - [SugarColumn(ColumnName = "F_TO")] - public string? To { get; set; } - - /// - /// 抄送人. - /// - [SugarColumn(ColumnName = "F_CC")] - public string? CC { get; set; } - - /// - /// 密送人. - /// - [SugarColumn(ColumnName = "F_BCC")] - public string? BCC { get; set; } - - /// - /// 颜色. - /// - [SugarColumn(ColumnName = "F_COLOUR")] - public string? Colour { get; set; } - - /// - /// 主题. - /// - [SugarColumn(ColumnName = "F_SUBJECT")] - public string? Subject { get; set; } - - /// - /// 正文. - /// - [SugarColumn(ColumnName = "F_BODYTEXT")] - public string BodyText { get; set; } = string.Empty; - - /// - /// 附件. - /// - [SugarColumn(ColumnName = "F_ATTACHMENT")] - public string? Attachment { get; set; } - - /// - /// 状态:【-1-草稿、0-正在投递、1-投递成功】. - /// - [SugarColumn(ColumnName = "F_STATE")] - public int? State { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/EmployeeEntity.cs b/extend/Tnb.Extend.Entitys/Entity/EmployeeEntity.cs deleted file mode 100644 index 1b30c7d9..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/EmployeeEntity.cs +++ /dev/null @@ -1,111 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 职员信息 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01 . -/// -[SugarTable("EXT_EMPLOYEE")] -public class EmployeeEntity : CLDEntityBase -{ - /// - /// 工号. - /// - [SugarColumn(ColumnName = "F_ENCODE")] - public string? EnCode { get; set; } - - /// - /// 姓名. - /// - [SugarColumn(ColumnName = "F_FULLNAME")] - public string? FullName { get; set; } - - /// - /// 性别. - /// - [SugarColumn(ColumnName = "F_GENDER")] - public string? Gender { get; set; } - - /// - /// 部门. - /// - [SugarColumn(ColumnName = "F_DEPARTMENTNAME")] - public string? DepartmentName { get; set; } - - /// - /// 职位. - /// - [SugarColumn(ColumnName = "F_POSITIONNAME")] - public string? PositionName { get; set; } - - /// - /// 用工性质. - /// - [SugarColumn(ColumnName = "F_WORKINGNATURE")] - public string? WorkingNature { get; set; } - - /// - /// 身份证号. - /// - [SugarColumn(ColumnName = "F_IDNUMBER")] - public string? IdNumber { get; set; } - - /// - /// 联系电话. - /// - [SugarColumn(ColumnName = "F_TELEPHONE")] - public string? Telephone { get; set; } - - /// - /// 参加工作. - /// - [SugarColumn(ColumnName = "F_ATTENDWORKTIME")] - public DateTime? AttendWorkTime { get; set; } - - /// - /// 出生年月. - /// - [SugarColumn(ColumnName = "F_BIRTHDAY")] - public DateTime? Birthday { get; set; } - - /// - /// 最高学历. - /// - [SugarColumn(ColumnName = "F_EDUCATION")] - public string? Education { get; set; } - - /// - /// 所学专业. - /// - [SugarColumn(ColumnName = "F_MAJOR")] - public string? Major { get; set; } - - /// - /// 毕业院校. - /// - [SugarColumn(ColumnName = "F_GRADUATIONACADEMY")] - public string? GraduationAcademy { get; set; } - - /// - /// 毕业时间. - /// - [SugarColumn(ColumnName = "F_GRADUATIONTIME")] - public DateTime? GraduationTime { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/OrderEntity.cs b/extend/Tnb.Extend.Entitys/Entity/OrderEntity.cs deleted file mode 100644 index 625c48da..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/OrderEntity.cs +++ /dev/null @@ -1,117 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 订单信息 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01 . -/// -[SugarTable("EXT_ORDER")] -public class OrderEntity : CLDEntityBase -{ - /// - /// 客户Id. - /// - [SugarColumn(ColumnName = "F_CUSTOMERID")] - public string? CustomerId { get; set; } - - /// - /// 客户名称. - /// - [SugarColumn(ColumnName = "F_CUSTOMERNAME")] - public string? CustomerName { get; set; } - - /// - /// 业务员Id. - /// - [SugarColumn(ColumnName = "F_SALESMANID")] - public string? SalesmanId { get; set; } - - /// - /// 业务员. - /// - [SugarColumn(ColumnName = "F_SALESMANNAME")] - public string? SalesmanName { get; set; } - - /// - /// 订单日期. - /// - [SugarColumn(ColumnName = "F_ORDERDATE")] - public DateTime? OrderDate { get; set; } - - /// - /// 订单编码. - /// - [SugarColumn(ColumnName = "F_ORDERCODE")] - public string? OrderCode { get; set; } - - /// - /// 运输方式. - /// - [SugarColumn(ColumnName = "F_TRANSPORTMODE")] - public string? TransportMode { get; set; } - - /// - /// 发货日期. - /// - [SugarColumn(ColumnName = "F_DELIVERYDATE")] - public DateTime? DeliveryDate { get; set; } - - /// - /// 发货地址. - /// - [SugarColumn(ColumnName = "F_DELIVERYADDRESS")] - public string? DeliveryAddress { get; set; } - - /// - /// 付款方式. - /// - [SugarColumn(ColumnName = "F_PAYMENTMODE")] - public string? PaymentMode { get; set; } - - /// - /// 应收金额. - /// - [SugarColumn(ColumnName = "F_RECEIVABLEMONEY")] - public decimal? ReceivableMoney { get; set; } - - /// - /// 定金比率. - /// - [SugarColumn(ColumnName = "F_EARNESTRATE")] - public decimal? EarnestRate { get; set; } - - /// - /// 预付定金. - /// - [SugarColumn(ColumnName = "F_PREPAYEARNEST")] - public decimal? PrepayEarnest { get; set; } - - /// - /// 当前状态. - /// - [SugarColumn(ColumnName = "F_CURRENTSTATE")] - public int? CurrentState { get; set; } - - /// - /// 附件信息. - /// - [SugarColumn(ColumnName = "F_FILEJSON")] - public string? FileJson { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/OrderEntryEntity.cs b/extend/Tnb.Extend.Entitys/Entity/OrderEntryEntity.cs deleted file mode 100644 index ec6855ff..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/OrderEntryEntity.cs +++ /dev/null @@ -1,105 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 订单明细 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01 . -/// -[SugarTable("EXT_ORDERENTRY")] -public class OrderEntryEntity : EntityBase -{ - /// - /// 订单主键. - /// - [SugarColumn(ColumnName = "F_ORDERID")] - public string? OrderId { get; set; } - - /// - /// 商品Id. - /// - [SugarColumn(ColumnName = "F_GOODSID")] - public string? GoodsId { get; set; } - - /// - /// 商品编码. - /// - [SugarColumn(ColumnName = "F_GOODSCODE")] - public string? GoodsCode { get; set; } - - /// - /// 商品名称. - /// - [SugarColumn(ColumnName = "F_GOODSNAME")] - public string? GoodsName { get; set; } - - /// - /// 规格型号. - /// - [SugarColumn(ColumnName = "F_SPECIFICATIONS")] - public string? Specifications { get; set; } - - /// - /// 单位. - /// - [SugarColumn(ColumnName = "F_UNIT")] - public string? Unit { get; set; } - - /// - /// 数量. - /// - [SugarColumn(ColumnName = "F_QTY")] - public decimal? Qty { get; set; } - - /// - /// 单价. - /// - [SugarColumn(ColumnName = "F_PRICE")] - public decimal? Price { get; set; } - - /// - /// 金额. - /// - [SugarColumn(ColumnName = "F_AMOUNT")] - public decimal? Amount { get; set; } - - /// - /// 折扣%. - /// - [SugarColumn(ColumnName = "F_DISCOUNT")] - public decimal? Discount { get; set; } - - /// - /// 税率%. - /// - [SugarColumn(ColumnName = "F_CESS")] - public decimal? Cess { get; set; } - - /// - /// 实际单价. - /// - [SugarColumn(ColumnName = "F_ACTUALPRICE")] - public decimal? ActualPrice { get; set; } - - /// - /// 实际金额. - /// - [SugarColumn(ColumnName = "F_ACTUALAMOUNT")] - public decimal? ActualAmount { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/OrderReceivableEntity.cs b/extend/Tnb.Extend.Entitys/Entity/OrderReceivableEntity.cs deleted file mode 100644 index e3896c50..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/OrderReceivableEntity.cs +++ /dev/null @@ -1,69 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 订单收款 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01 . -/// -[SugarTable("EXT_ORDERRECEIVABLE")] -public class OrderReceivableEntity : EntityBase -{ - /// - /// 订单主键. - /// - [SugarColumn(ColumnName = "F_ORDERID")] - public string? OrderId { get; set; } - - /// - /// 收款摘要. - /// - [SugarColumn(ColumnName = "F_ABSTRACT")] - public string? Abstract { get; set; } - - /// - /// 收款日期. - /// - [SugarColumn(ColumnName = "F_RECEIVABLEDATE")] - public DateTime? ReceivableDate { get; set; } - - /// - /// 收款比率. - /// - [SugarColumn(ColumnName = "F_RECEIVABLERATE")] - public decimal? ReceivableRate { get; set; } - - /// - /// 收款金额. - /// - [SugarColumn(ColumnName = "F_RECEIVABLEMONEY")] - public decimal? ReceivableMoney { get; set; } - - /// - /// 收款方式. - /// - [SugarColumn(ColumnName = "F_RECEIVABLEMODE")] - public string? ReceivableMode { get; set; } - - /// - /// 收款状态. - /// - [SugarColumn(ColumnName = "F_RECEIVABLESTATE")] - public int? ReceivableState { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/ProductClassifyEntity.cs b/extend/Tnb.Extend.Entitys/Entity/ProductClassifyEntity.cs deleted file mode 100644 index c5ddb11d..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/ProductClassifyEntity.cs +++ /dev/null @@ -1,43 +0,0 @@ -using JNPF.Common.Const; -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 产品分类. -/// -[SugarTable("ext_productclassify")] -[Tenant(ClaimConst.TENANTID)] -public class ProductClassifyEntity : CLEntityBase -{ - /// - /// 上级. - /// - [SugarColumn(ColumnName = "F_PARENTID")] - public string ParentId { get; set; } - - /// - /// 名称. - /// - [SugarColumn(ColumnName = "F_FULLNAME")] - public string FullName { get; set; } - - /// - /// 获取或设置 删除标志. - /// - [SugarColumn(ColumnName = "F_DeleteMark", ColumnDescription = "删除标志")] - public int? DeleteMark { get; set; } - - /// - /// 获取或设置 删除时间. - /// - [SugarColumn(ColumnName = "F_DeleteTime", ColumnDescription = "删除时间")] - public DateTime? DeleteTime { get; set; } - - /// - /// 获取或设置 删除用户. - /// - [SugarColumn(ColumnName = "F_DeleteUserId", ColumnDescription = "删除用户")] - public string DeleteUserId { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Entity/ProductCustomerEntity.cs b/extend/Tnb.Extend.Entitys/Entity/ProductCustomerEntity.cs deleted file mode 100644 index 76bc96bd..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/ProductCustomerEntity.cs +++ /dev/null @@ -1,59 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys.Entity; - -/// -/// 客户信息. -/// -[SugarTable("ext_customer", TableDescription = "客户信息")] -public class ProductCustomerEntity : CLEntityBase -{ - /// - /// 编码. - /// - [SugarColumn(ColumnName = "F_Code")] - public string Code { get; set; } - - /// - /// 客户名称. - /// - [SugarColumn(ColumnName = "F_CustomerName")] - public string Customername { get; set; } - - /// - /// 地址. - /// - [SugarColumn(ColumnName = "F_Address")] - public string Address { get; set; } - - /// - /// 名称. - /// - [SugarColumn(ColumnName = "F_Name")] - public string Name { get; set; } - - /// - /// 联系方式. - /// - [SugarColumn(ColumnName = "F_ContactTel")] - public string ContactTel { get; set; } - - /// - /// 删除标志. - /// - [SugarColumn(ColumnName = "F_DeleteMark")] - public float Deletemark { get; set; } - - /// - /// 删除时间. - /// - [SugarColumn(ColumnName = "F_DeleteTime")] - public DateTime Deletetime { get; set; } - - /// - /// 删除用户. - /// - [SugarColumn(ColumnName = "F_DeleteUserId")] - public string Deleteuserid { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Entity/ProductEntity.cs b/extend/Tnb.Extend.Entitys/Entity/ProductEntity.cs deleted file mode 100644 index 00144cd5..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/ProductEntity.cs +++ /dev/null @@ -1,229 +0,0 @@ -using JNPF.Common.Const; -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 销售订单. -/// -[SugarTable("ext_product")] -[Tenant(ClaimConst.TENANTID)] -public class ProductEntity : EntityBase -{ - /// - /// 订单编号. - /// - [SugarColumn(ColumnName = "F_Code")] - public string Code { get; set; } - - /// - /// 客户类别. - /// - [SugarColumn(ColumnName = "F_Type")] - public string Type { get; set; } - - /// - /// 客户id. - /// - [SugarColumn(ColumnName = "F_CustomerId")] - public string CustomerId { get; set; } - - /// - /// 客户名称. - /// - [SugarColumn(ColumnName = "F_CustomerName")] - public string CustomerName { get; set; } - - /// - /// 制单人id. - /// - [SugarColumn(ColumnName = "F_SalesmanId")] - public string SalesmanId { get; set; } - - /// - /// 制单人名称. - /// - [SugarColumn(ColumnName = "F_SalesmanName")] - public string SalesmanName { get; set; } - - /// - /// 制单日期. - /// - [SugarColumn(ColumnName = "F_SalesmanDate")] - public DateTime? SalesmanDate { get; set; } - - /// - /// 审核人. - /// - [SugarColumn(ColumnName = "F_AuditName")] - public string AuditName { get; set; } - - /// - /// 审核日期. - /// - [SugarColumn(ColumnName = "F_AuditDate")] - public DateTime? AuditDate { get; set; } - - /// - /// 审核状态. - /// - [SugarColumn(ColumnName = "F_AuditState")] - public int AuditState { get; set; } - - /// - /// 发货仓库. - /// - [SugarColumn(ColumnName = "F_GoodsWarehouse")] - public string GoodsWarehouse { get; set; } - - /// - /// 发货通知时间. - /// - [SugarColumn(ColumnName = "F_GoodsDate")] - public DateTime? GoodsDate { get; set; } - - /// - /// 发货通知人. - /// - [SugarColumn(ColumnName = "F_Consignor")] - public string Consignor { get; set; } - - /// - /// 发货状态. - /// - [SugarColumn(ColumnName = "F_GoodsState")] - public int GoodsState { get; set; } - - /// - /// 关闭状态. - /// - [SugarColumn(ColumnName = "F_CloseState")] - public int CloseState { get; set; } - - /// - /// 关闭日期. - /// - [SugarColumn(ColumnName = "F_CloseDate")] - public DateTime? CloseDate { get; set; } - - /// - /// 收款方式. - /// - [SugarColumn(ColumnName = "F_GatheringType")] - public string GatheringType { get; set; } - - /// - /// 业务员. - /// - [SugarColumn(ColumnName = "F_Business")] - public string Business { get; set; } - - /// - /// 送货地址. - /// - [SugarColumn(ColumnName = "F_Address")] - public string Address { get; set; } - - /// - /// 联系方式. - /// - [SugarColumn(ColumnName = "F_ContactTel")] - public string ContactTel { get; set; } - - /// - /// 联系人. - /// - [SugarColumn(ColumnName = "F_ContactName")] - public string ContactName { get; set; } - - /// - /// 收货消息. - /// - [SugarColumn(ColumnName = "F_HarvestMsg")] - public int HarvestMsg { get; set; } - - /// - /// 收货仓库. - /// - [SugarColumn(ColumnName = "F_HarvestWarehouse")] - public string HarvestWarehouse { get; set; } - - /// - /// 代发客户. - /// - [SugarColumn(ColumnName = "F_IssuingName")] - public string IssuingName { get; set; } - - /// - /// 让利金额. - /// - [SugarColumn(ColumnName = "F_PartPrice")] - public decimal? PartPrice { get; set; } - - /// - /// 优惠金额. - /// - [SugarColumn(ColumnName = "F_ReducedPrice")] - public decimal? ReducedPrice { get; set; } - - /// - /// 折后金额. - /// - [SugarColumn(ColumnName = "F_DiscountPrice")] - public decimal? DiscountPrice { get; set; } - - /// - /// 备注. - /// - [SugarColumn(ColumnName = "F_Description")] - public string Description { get; set; } - - /// - /// 获取或设置 创建时间. - /// - [SugarColumn(ColumnName = "F_CREATORTIME", ColumnDescription = "创建时间")] - public DateTime? CreatorTime { get; set; } - - /// - /// 获取或设置 创建用户. - /// - [SugarColumn(ColumnName = "F_CREATORUSERID", ColumnDescription = "创建用户")] - public string CreatorUserId { get; set; } - - /// - /// 获取或设置 修改时间. - /// - [SugarColumn(ColumnName = "F_LastModifyTime", ColumnDescription = "修改时间")] - public virtual DateTime? LastModifyTime { get; set; } - - /// - /// 获取或设置 修改用户. - /// - [SugarColumn(ColumnName = "F_LastModifyUserId", ColumnDescription = "修改用户")] - public string LastModifyUserId { get; set; } - - /// - /// 获取或设置 删除标志. - /// - [SugarColumn(ColumnName = "F_DeleteMark", ColumnDescription = "删除标志")] - public int? DeleteMark { get; set; } - - /// - /// 获取或设置 删除时间. - /// - [SugarColumn(ColumnName = "F_DeleteTime", ColumnDescription = "删除时间")] - public DateTime? DeleteTime { get; set; } - - /// - /// 获取或设置 删除用户. - /// - [SugarColumn(ColumnName = "F_DeleteUserId", ColumnDescription = "删除用户")] - public string DeleteUserId { get; set; } - - /// - /// 订单明细. - /// - [Navigate(NavigateType.OneToMany, nameof(ProductEntryEntity.ProductId), nameof(Id))] - public List productEntryList { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Entity/ProductEntryEntity.cs b/extend/Tnb.Extend.Entitys/Entity/ProductEntryEntity.cs deleted file mode 100644 index b098cc53..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/ProductEntryEntity.cs +++ /dev/null @@ -1,139 +0,0 @@ -using JNPF.Common.Const; -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 产品明细. -/// -[SugarTable("ext_productentry")] -[Tenant(ClaimConst.TENANTID)] -public class ProductEntryEntity -{ - /// - /// 主键. - /// - [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] - public string Id { get; set; } - - /// - /// 订单主键. - /// - [SugarColumn(ColumnName = "F_ProductId")] - public string ProductId { get; set; } - - /// - /// 产品编号. - /// - [SugarColumn(ColumnName = "F_ProductCode")] - public string ProductCode { get; set; } - - /// - /// 产品名称. - /// - [SugarColumn(ColumnName = "F_ProductName")] - public string ProductName { get; set; } - - /// - /// 产品规格. - /// - [SugarColumn(ColumnName = "F_ProductSpecification")] - public string ProductSpecification { get; set; } - - /// - /// 数量. - /// - [SugarColumn(ColumnName = "F_Qty")] - public int Qty { get; set; } - - /// - /// 控制方式. - /// - [SugarColumn(ColumnName = "F_CommandType")] - public string CommandType { get; set; } - - /// - /// 订货类型. - /// - [SugarColumn(ColumnName = "F_Type")] - public string Type { get; set; } - - /// - /// 单价. - /// - [SugarColumn(ColumnName = "F_Money")] - public decimal Money { get; set; } - - /// - /// 单位. - /// - [SugarColumn(ColumnName = "F_Util")] - public string Util { get; set; } - - /// - /// 折后单价. - /// - [SugarColumn(ColumnName = "F_Price")] - public decimal Price { get; set; } - - /// - /// 金额. - /// - [SugarColumn(ColumnName = "F_Amount")] - public decimal Amount { get; set; } - - /// - /// 活动. - /// - [SugarColumn(ColumnName = "F_Activity")] - public string Activity { get; set; } - - /// - /// 备注. - /// - [SugarColumn(ColumnName = "F_Description")] - public string Description { get; set; } - - /// - /// 获取或设置 创建时间. - /// - [SugarColumn(ColumnName = "F_CREATORTIME", ColumnDescription = "创建时间")] - public DateTime? CreatorTime { get; set; } - - /// - /// 获取或设置 创建用户. - /// - [SugarColumn(ColumnName = "F_CREATORUSERID", ColumnDescription = "创建用户")] - public string CreatorUserId { get; set; } - - /// - /// 获取或设置 修改时间. - /// - [SugarColumn(ColumnName = "F_LastModifyTime", ColumnDescription = "修改时间")] - public DateTime? LastModifyTime { get; set; } - - /// - /// 获取或设置 修改用户. - /// - [SugarColumn(ColumnName = "F_LastModifyUserId", ColumnDescription = "修改用户")] - public string LastModifyUserId { get; set; } - - /// - /// 获取或设置 删除标志. - /// - [SugarColumn(ColumnName = "F_DeleteMark", ColumnDescription = "删除标志")] - public int? DeleteMark { get; set; } - - /// - /// 获取或设置 删除时间. - /// - [SugarColumn(ColumnName = "F_DeleteTime", ColumnDescription = "删除时间")] - public DateTime? DeleteTime { get; set; } - - /// - /// 获取或设置 删除用户. - /// - [SugarColumn(ColumnName = "F_DeleteUserId", ColumnDescription = "删除用户")] - public string DeleteUserId { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Entity/ProductgoodsEntity.cs b/extend/Tnb.Extend.Entitys/Entity/ProductgoodsEntity.cs deleted file mode 100644 index 3e587ce7..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/ProductgoodsEntity.cs +++ /dev/null @@ -1,109 +0,0 @@ -using JNPF.Common.Const; -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 产品商品. -/// -[SugarTable("ext_productgoods")] -[Tenant(ClaimConst.TENANTID)] -public class ProductGoodsEntity -{ - /// - /// 主键. - /// - [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] - public string Id { get; set; } - - /// - /// 分类主键. - /// - [SugarColumn(ColumnName = "F_CLASSIFYID")] - public string ClassifyId { get; set; } - - /// - /// 产品编号. - /// - [SugarColumn(ColumnName = "F_CODE")] - public string Code { get; set; } - - /// - /// 产品名称. - /// - [SugarColumn(ColumnName = "F_FULLNAME")] - public string FullName { get; set; } - - /// - /// 订货类型. - /// - [SugarColumn(ColumnName = "F_TYPE")] - public string Type { get; set; } - - /// - /// 产品规格. - /// - [SugarColumn(ColumnName = "F_PRODUCTSPECIFICATION")] - public string ProductSpecification { get; set; } - - /// - /// 单价. - /// - [SugarColumn(ColumnName = "F_MONEY")] - public string Money { get; set; } - - /// - /// 库存数. - /// - [SugarColumn(ColumnName = "F_QTY")] - public int Qty { get; set; } - - /// - /// 金额. - /// - [SugarColumn(ColumnName = "F_AMOUNT")] - public string Amount { get; set; } - - /// - /// 获取或设置 创建时间. - /// - [SugarColumn(ColumnName = "F_CREATORTIME", ColumnDescription = "创建时间")] - public DateTime? CreatorTime { get; set; } - - /// - /// 获取或设置 创建用户. - /// - [SugarColumn(ColumnName = "F_CREATORUSERID", ColumnDescription = "创建用户")] - public string CreatorUserId { get; set; } - - /// - /// 获取或设置 修改时间. - /// - [SugarColumn(ColumnName = "F_LastModifyTime", ColumnDescription = "修改时间")] - public DateTime? LastModifyTime { get; set; } - - /// - /// 获取或设置 修改用户. - /// - [SugarColumn(ColumnName = "F_LastModifyUserId", ColumnDescription = "修改用户")] - public string LastModifyUserId { get; set; } - - /// - /// 获取或设置 删除标志. - /// - [SugarColumn(ColumnName = "F_DeleteMark", ColumnDescription = "删除标志")] - public int? DeleteMark { get; set; } - - /// - /// 获取或设置 删除时间. - /// - [SugarColumn(ColumnName = "F_DeleteTime", ColumnDescription = "删除时间")] - public DateTime? DeleteTime { get; set; } - - /// - /// 获取或设置 删除用户. - /// - [SugarColumn(ColumnName = "F_DeleteUserId", ColumnDescription = "删除用户")] - public string DeleteUserId { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Entity/ProjectGanttEntity.cs b/extend/Tnb.Extend.Entitys/Entity/ProjectGanttEntity.cs deleted file mode 100644 index 0e74111b..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/ProjectGanttEntity.cs +++ /dev/null @@ -1,106 +0,0 @@ -using JNPF.Common.Const; -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 项目计划 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.yinmaisoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01. -/// -[SugarTable("EXT_PROJECTGANTT")] -public class ProjectGanttEntity : CLDEntityBase -{ - /// - /// 项目上级. - /// - [SugarColumn(ColumnName = "F_PARENTID")] - public string? ParentId { get; set; } - - /// - /// 项目主键. - /// - [SugarColumn(ColumnName = "F_PROJECTID")] - public string? ProjectId { get; set; } - - /// - /// 项目类型:【1-项目、2-任务】. - /// - [SugarColumn(ColumnName = "F_TYPE")] - public int? Type { get; set; } - - /// - /// 项目编码. - /// - [SugarColumn(ColumnName = "F_ENCODE")] - public string? EnCode { get; set; } - - /// - /// 项目名称. - /// - [SugarColumn(ColumnName = "F_FULLNAME")] - public string? FullName { get; set; } - - /// - /// 项目工期. - /// - [SugarColumn(ColumnName = "F_TIMELIMIT")] - public decimal? TimeLimit { get; set; } - - /// - /// 项目标记. - /// - [SugarColumn(ColumnName = "F_SIGN")] - public string? Sign { get; set; } - - /// - /// 标记颜色. - /// - [SugarColumn(ColumnName = "F_SIGNCOLOR")] - public string? SignColor { get; set; } - - /// - /// 开始时间. - /// - [SugarColumn(ColumnName = "F_STARTTIME")] - public DateTime? StartTime { get; set; } - - /// - /// 结束时间. - /// - [SugarColumn(ColumnName = "F_ENDTIME")] - public DateTime? EndTime { get; set; } - - /// - /// 当前进度. - /// - [SugarColumn(ColumnName = "F_SCHEDULE")] - public int? Schedule { get; set; } - - /// - /// 负责人. - /// - [SugarColumn(ColumnName = "F_MANAGERIDS")] - public string? ManagerIds { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } - - /// - /// 项目状态. - /// - [SugarColumn(ColumnName = "F_STATE")] - public int? State { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/ScheduleEntity.cs b/extend/Tnb.Extend.Entitys/Entity/ScheduleEntity.cs deleted file mode 100644 index e52c5cef..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/ScheduleEntity.cs +++ /dev/null @@ -1,100 +0,0 @@ -using JNPF.Common.Const; -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 日程安排 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01. -/// -[SugarTable("EXT_SCHEDULE")] -public class ScheduleEntity : CLDEntityBase -{ - /// - /// 日程标题. - /// - [SugarColumn(ColumnName = "F_TITLE")] - public string? Title { get; set; } - - /// - /// 日程内容. - /// - [SugarColumn(ColumnName = "F_CONTENT")] - public string? Content { get; set; } - - /// - /// 日程颜色. - /// - [SugarColumn(ColumnName = "F_COLOUR")] - public string? Colour { get; set; } - - /// - /// 颜色样式. - /// - [SugarColumn(ColumnName = "F_COLOURCSS")] - public string? ColourCss { get; set; } - - /// - /// 开始时间. - /// - [SugarColumn(ColumnName = "F_STARTTIME")] - public DateTime? StartTime { get; set; } - - /// - /// 结束时间. - /// - [SugarColumn(ColumnName = "F_ENDTIME")] - public DateTime? EndTime { get; set; } - - /// - /// 提醒设置. - /// - [SugarColumn(ColumnName = "F_EARLY")] - public int? Early { get; set; } - - /// - /// APP提醒. - /// - [SugarColumn(ColumnName = "F_MAILALERT")] - public int? MailAlert { get; set; } - - /// - /// 邮件提醒. - /// - [SugarColumn(ColumnName = "F_APPALERT")] - public int? AppAlert { get; set; } - - /// - /// 微信提醒. - /// - [SugarColumn(ColumnName = "F_WECHATALERT")] - public int? WeChatAlert { get; set; } - - /// - /// 短信提醒. - /// - [SugarColumn(ColumnName = "F_MOBILEALERT")] - public int? MobileAlert { get; set; } - - /// - /// 系统提醒. - /// - [SugarColumn(ColumnName = "F_SYSTEMALERT")] - public int? SystemAlert { get; set; } - - /// - /// 描述. - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序码. - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/TableExampleEntity.cs b/extend/Tnb.Extend.Entitys/Entity/TableExampleEntity.cs deleted file mode 100644 index 1517173e..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/TableExampleEntity.cs +++ /dev/null @@ -1,162 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 表格示例数据 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01 . -/// -[SugarTable("EXT_TABLEEXAMPLE")] -public class TableExampleEntity : EntityBase -{ - /// - /// 交互日期. - /// - /// - [SugarColumn(ColumnName = "F_INTERACTIONDATE")] - public DateTime? InteractionDate { get; set; } - - /// - /// 项目编码. - /// - /// - [SugarColumn(ColumnName = "F_PROJECTCODE")] - public string? ProjectCode { get; set; } - - /// - /// 项目名称. - /// - /// - [SugarColumn(ColumnName = "F_PROJECTNAME")] - public string? ProjectName { get; set; } - - /// - /// 负责人. - /// - /// - [SugarColumn(ColumnName = "F_PRINCIPAL")] - public string? Principal { get; set; } - - /// - /// 立顶人. - /// - /// - [SugarColumn(ColumnName = "F_JACKSTANDS")] - public string? JackStands { get; set; } - - /// - /// 项目类型. - /// - /// - [SugarColumn(ColumnName = "F_PROJECTTYPE")] - public string? ProjectType { get; set; } - - /// - /// 项目阶段. - /// - /// - [SugarColumn(ColumnName = "F_PROJECTPHASE")] - public string? ProjectPhase { get; set; } - - /// - /// 客户名称. - /// - /// - [SugarColumn(ColumnName = "F_CUSTOMERNAME")] - public string? CustomerName { get; set; } - - /// - /// 费用金额. - /// - /// - [SugarColumn(ColumnName = "F_COSTAMOUNT")] - public decimal? CostAmount { get; set; } - - /// - /// 已用金额. - /// - /// - [SugarColumn(ColumnName = "F_TUNESAMOUNT")] - public decimal? TunesAmount { get; set; } - - /// - /// 预计收入. - /// - /// - [SugarColumn(ColumnName = "F_PROJECTEDINCOME")] - public decimal? ProjectedIncome { get; set; } - - /// - /// 登记人. - /// - /// - [SugarColumn(ColumnName = "F_REGISTRANT")] - public string? Registrant { get; set; } - - /// - /// 登记时间. - /// - /// - [SugarColumn(ColumnName = "F_REGISTERDATE")] - public DateTime? RegisterDate { get; set; } - - /// - /// 备注. - /// - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 标记. - /// - /// - [SugarColumn(ColumnName = "F_SIGN")] - public string? Sign { get; set; } - - /// - /// 批注列表Json. - /// - /// - [SugarColumn(ColumnName = "F_POSTILJSON")] - public string? PostilJson { get; set; } - - /// - /// 批注总数. - /// - /// - [SugarColumn(ColumnName = "F_POSTILCOUNT")] - public int? PostilCount { get; set; } - - /// - /// 有效标志. - /// - /// - [SugarColumn(ColumnName = "F_ENABLEDMARK")] - public int? EnabledMark { get; set; } - - /// - /// 排序码. - /// - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } - - /// - /// 编辑时间. - /// - /// - [SugarColumn(ColumnName = "F_LASTMODIFYTIME")] - public DateTime? LastModifyTime { get; set; } - - /// - /// 编辑用户. - /// - /// - [SugarColumn(ColumnName = "F_LASTMODIFYUSERID")] - public string? LastModifyUserId { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Entity/WorkLogEntity.cs b/extend/Tnb.Extend.Entitys/Entity/WorkLogEntity.cs deleted file mode 100644 index 9b84eabc..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/WorkLogEntity.cs +++ /dev/null @@ -1,64 +0,0 @@ -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 工作日志 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01 . -/// -[SugarTable("EXT_WORKLOG")] -public class WorkLogEntity : CLDEntityBase -{ - /// - /// 日志标题. - /// - /// - [SugarColumn(ColumnName = "F_TITLE")] - public string? Title { get; set; } - - /// - /// 今天内容. - /// - /// - [SugarColumn(ColumnName = "F_TODAYCONTENT")] - public string? TodayContent { get; set; } - - /// - /// 明天内容. - /// - /// - [SugarColumn(ColumnName = "F_TOMORROWCONTENT")] - public string? TomorrowContent { get; set; } - - /// - /// 遇到问题. - /// - /// - [SugarColumn(ColumnName = "F_QUESTION")] - public string? Question { get; set; } - - /// - /// 发送给谁. - /// - /// - [SugarColumn(ColumnName = "F_TOUSERID")] - public string? ToUserId { get; set; } - - /// - /// 描述. - /// - /// - [SugarColumn(ColumnName = "F_DESCRIPTION")] - public string? Description { get; set; } - - /// - /// 排序. - /// - /// - [SugarColumn(ColumnName = "F_SORTCODE")] - public long? SortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Entity/WorkLogShareEntity.cs b/extend/Tnb.Extend.Entitys/Entity/WorkLogShareEntity.cs deleted file mode 100644 index d6e27124..00000000 --- a/extend/Tnb.Extend.Entitys/Entity/WorkLogShareEntity.cs +++ /dev/null @@ -1,37 +0,0 @@ -using JNPF.Common.Const; -using JNPF.Common.Contracts; -using SqlSugar; - -namespace JNPF.Extend.Entitys; - -/// -/// 工作日志分享 -/// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 -/// 日 期:2021-06-01 . -/// -[SugarTable("EXT_WORKLOGSHARE")] -public class WorkLogShareEntity : EntityBase -{ - /// - /// 日志主键. - /// - /// - [SugarColumn(ColumnName = "F_WORKLOGID")] - public string? WorkLogId { get; set; } - - /// - /// 共享人员. - /// - /// - [SugarColumn(ColumnName = "F_SHAREUSERID")] - public string? ShareUserId { get; set; } - - /// - /// 共享时间. - /// - /// - [SugarColumn(ColumnName = "F_SHARETIME")] - public DateTime? ShareTime { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Mapper/Mapper.cs b/extend/Tnb.Extend.Entitys/Mapper/Mapper.cs deleted file mode 100644 index 73c5ba7f..00000000 --- a/extend/Tnb.Extend.Entitys/Mapper/Mapper.cs +++ /dev/null @@ -1,38 +0,0 @@ -using JNPF.Extend.Entitys.Dto.Email; -using JNPF.Extend.Entitys.Dto.Order; -using Mapster; - -namespace JNPF.Extend.Entitys.Mapper -{ - class Mapper : IRegister - { - public void Register(TypeAdapterConfig config) - { - config.ForType() - .Map(dest => dest.fullName, src => src.Subject); - config.ForType() - .Map(dest => dest.fdate, src => src.Date) - .Map(dest => dest.sender, src => src.SenderName) - .Map(dest => dest.isRead, src => src.Read); - config.ForType() - .Map(dest => dest.recipient, src => src.To); - config.ForType() - .Map(dest => dest.emailSsl, src => src.Ssl); - config.ForType() - .Map(dest => dest.recipient, src => src.MAccount) - .Map(dest => dest.fdate, src => src.Date); - config.ForType() - .Map(dest => dest.recipient, src => src.To); - config.ForType() - .Map(dest => dest.fabstract, src => src.Abstract) - .Map(dest => dest.receivableMoney, src => src.ReceivableMoney.ToString()); - config.ForType() - .Map(dest => dest.Ssl, src => src.emailSsl); - config.ForType() - .Map(dest => dest.Ssl, src => src.emailSsl); - - //config.ForType() - // .Map(dest => dest.Ssl, src => src.Ssl != null && src.Ssl == 1 ? true : false); - } - } -} diff --git a/extend/Tnb.Extend.Entitys/Model/CollectionPlanModel.cs b/extend/Tnb.Extend.Entitys/Model/CollectionPlanModel.cs deleted file mode 100644 index 283b4595..00000000 --- a/extend/Tnb.Extend.Entitys/Model/CollectionPlanModel.cs +++ /dev/null @@ -1,60 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Model; - -/// -/// -/// -[SuppressSniffer] -public class CollectionPlanModel -{ - /// - /// 收款日期. - /// - public DateTime? receivableDate { get; set; } - - /// - /// 收款比率. - /// - public decimal? receivableRate { get; set; } - - /// - /// 收款金额. - /// - public decimal? receivableMoney { get; set; } - - /// - /// 收款方式. - /// - public string? receivableMode { get; set; } - - /// - /// 收款摘要. - /// - public string? fabstract { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } - - /// - /// id. - /// - public string? id { get; set; } - - /// - /// 订单id. - /// - public string? orderId { get; set; } - - /// - /// 接收状态. - /// - public int? receivableState { get; set; } - - /// - /// 排序. - /// - public long? sortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Model/GoodsModel.cs b/extend/Tnb.Extend.Entitys/Model/GoodsModel.cs deleted file mode 100644 index aba795c4..00000000 --- a/extend/Tnb.Extend.Entitys/Model/GoodsModel.cs +++ /dev/null @@ -1,87 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Model; - -[SuppressSniffer] -public class GoodsModel -{ - /// - /// 商品id. - /// - public string? goodsId { get; set; } - - /// - /// 商品名称. - /// - public string? goodsName { get; set; } - - /// - /// 规格型号. - /// - public string? specifications { get; set; } - - /// - /// 单位. - /// - public string? unit { get; set; } - - /// - /// 数量. - /// - public decimal? qty { get; set; } - - /// - /// 单价. - /// - public decimal? price { get; set; } - - /// - /// 金额. - /// - public decimal? amount { get; set; } - - /// - /// 折扣. - /// - public decimal? discount { get; set; } - - /// - /// 税率. - /// - public decimal? cess { get; set; } - - /// - /// 实际单价. - /// - public decimal? actualPrice { get; set; } - - /// - /// 实际金额. - /// - public decimal? actualAmount { get; set; } - - /// - /// 备注. - /// - public string? description { get; set; } - - /// - /// 商品编码. - /// - public string? goodsCode { get; set; } - - /// - /// id. - /// - public string? id { get; set; } - - /// - /// 距离. - /// - public string? remove { get; set; } - - /// - /// 排序. - /// - public long? sortCode { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Model/PostilModel.cs b/extend/Tnb.Extend.Entitys/Model/PostilModel.cs deleted file mode 100644 index 07da934e..00000000 --- a/extend/Tnb.Extend.Entitys/Model/PostilModel.cs +++ /dev/null @@ -1,22 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Model; - -[SuppressSniffer] -public class PostilModel -{ - /// - /// 用户id. - /// - public string? userId { get; set; } - - /// - /// 内容. - /// - public string? text { get; set; } - - /// - /// 创建时间. - /// - public DateTime? creatorTime { get; set; } -} diff --git a/extend/Tnb.Extend.Entitys/Model/ProductEntryMdoel.cs b/extend/Tnb.Extend.Entitys/Model/ProductEntryMdoel.cs deleted file mode 100644 index 04bad2e2..00000000 --- a/extend/Tnb.Extend.Entitys/Model/ProductEntryMdoel.cs +++ /dev/null @@ -1,40 +0,0 @@ -using JNPF.DependencyInjection; - -namespace JNPF.Extend.Entitys.Model; - -/// -/// 产品明细. -/// -[SuppressSniffer] -public class ProductEntryMdoel -{ - /// - /// 产品规格. - /// - public string productSpecification { get; set; } - - /// - /// 数量. - /// - public string qty { get; set; } - - /// - /// 单价. - /// - public decimal money { get; set; } - - /// - /// 折后单价. - /// - public decimal price { get; set; } - - /// - /// 单位. - /// - public string util { get; set; } - - /// - /// 控制方式. - /// - public string commandType { get; set; } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Properties/launchSettings.json b/extend/Tnb.Extend.Entitys/Properties/launchSettings.json deleted file mode 100644 index dca0860f..00000000 --- a/extend/Tnb.Extend.Entitys/Properties/launchSettings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "profiles": { - "Tnb.Extend.Entitys": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:50285;http://localhost:50286" - } - } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Entitys/Tnb.Extend.Entitys.csproj b/extend/Tnb.Extend.Entitys/Tnb.Extend.Entitys.csproj deleted file mode 100644 index 08bcb7bf..00000000 --- a/extend/Tnb.Extend.Entitys/Tnb.Extend.Entitys.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - net6.0 - enable - enable - False - $(NoWarn);CS8618; - Debug;Release;tianyi - - - - - - - diff --git a/extend/Tnb.Extend.Interfaces/Properties/launchSettings.json b/extend/Tnb.Extend.Interfaces/Properties/launchSettings.json deleted file mode 100644 index 77266e9a..00000000 --- a/extend/Tnb.Extend.Interfaces/Properties/launchSettings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "profiles": { - "Tnb.Extend.Interfaces": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:50283;http://localhost:50284" - } - } -} \ No newline at end of file diff --git a/extend/Tnb.Extend.Interfaces/Tnb.Extend.Interfaces.csproj b/extend/Tnb.Extend.Interfaces/Tnb.Extend.Interfaces.csproj deleted file mode 100644 index e2d74688..00000000 --- a/extend/Tnb.Extend.Interfaces/Tnb.Extend.Interfaces.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - net6.0 - enable - enable - False - Debug;Release;tianyi - - - - - - - diff --git a/extend/Tnb.Extend/BigDataService.cs b/extend/Tnb.Extend/BigDataService.cs deleted file mode 100644 index 6de96d15..00000000 --- a/extend/Tnb.Extend/BigDataService.cs +++ /dev/null @@ -1,128 +0,0 @@ -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Security; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.BigData; -using JNPF.FriendlyException; -using JNPF.LinqBuilder; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; - -namespace JNPF.Extend; - -/// -/// 大数据测试 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "BigData", Order = 600)] -[Route("api/extend/[controller]")] -public class BigDataService : IDynamicApiController, ITransient -{ - private readonly ISqlSugarRepository _repository; - - /// - /// 初始化一个类型的新实例. - /// - public BigDataService(ISqlSugarRepository repository) - { - _repository = repository; - } - - #region GET - - /// - /// 列表 - /// - /// 请求参数 - /// - [HttpGet("")] - public async Task GetList([FromQuery] PageInputBase input) - { - var queryWhere = LinqExpression.And(); - if (!string.IsNullOrEmpty(input.keyword)) - queryWhere = queryWhere.And(m => m.FullName.Contains(input.keyword) || m.EnCode.Contains(input.keyword)); - var list = await _repository.AsQueryable().Where(queryWhere).OrderBy(x => x.CreatorTime, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize); - var pageList = new SqlSugarPagedList() - { - list = list.list.Adapt>(), - pagination = list.pagination - }; - return PageResult.SqlSugarPageResult(pageList); - } - #endregion - - #region POST - - /// - /// 新建 - /// - /// - [HttpPost("")] - public async Task Create() - { - var list = await _repository.GetListAsync(); - var code = 0; - if (list.Count > 0) - { - code = list.Select(x => x.EnCode).ToList().Max().ParseToInt(); - } - var index = code == 0 ? 10000001 : code; - if (index > 11500001) - throw Oops.Oh(ErrorCode.Ex0001); - List entityList = new List(); - for (int i = 0; i < 10000; i++) - { - entityList.Add(new BigDataEntity - { - Id = SnowflakeIdHelper.NextId(), - EnCode = index.ToString(), - FullName = "测试大数据" + index, - CreatorTime = DateTime.Now, - }); - index++; - } - Blukcopy(entityList); - } - - #endregion - - #region PrivateMethod - - /// - /// 大数据批量插入. - /// - /// - private void Blukcopy(List entityList) - { - try - { - var storageable = _repository.AsSugarClient().Storageable(entityList).SplitInsert(x => true).ToStorage(); - switch (_repository.AsSugarClient().CurrentConnectionConfig.DbType) - { - case DbType.Dm: - case DbType.Kdbndp: - storageable.AsInsertable.ExecuteCommand(); - break; - case DbType.Oracle: - _repository.AsSugarClient().Storageable(entityList).ToStorage().BulkCopy(); - break; - default: - _repository.AsSugarClient().Fastest().BulkCopy(entityList); - break; - } - } - catch (Exception ex) - { - throw; - } - - } - - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/DataMgrService.cs b/extend/Tnb.Extend/DataMgrService.cs deleted file mode 100644 index f00ad4ec..00000000 --- a/extend/Tnb.Extend/DataMgrService.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System.Data; -using JNPF.Common.Core.Manager; -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Security; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.WoekLog; -using JNPF.Extend.Entitys.Dto.WorkLog; -using JNPF.FriendlyException; -using JNPF.Systems.Entitys.Permission; -using JNPF.Systems.Interfaces.Permission; -using Mapster; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using Yitter.IdGenerator; - -namespace JNPF.Extend; - -/// -/// 工作日志 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "DataMgr", Order = 600)] -[Route("api/extend/[controller]")] -public class DataMgrService : IDynamicApiController, ITransient -{ - private readonly SqlSugarScope _sugar; - private readonly ITenant _db; - - public DataMgrService(ISqlSugarClient context) - { - _sugar = (SqlSugarScope)context; - _db = context.AsTenant(); - } - - /// - /// 使用雪花Id - /// - /// - [HttpPost("renew-snow-id")] - [AllowAnonymous] - public async Task RenewSnowIdAsync(DbMainTable mainTbl) - { - int count = 0; - var tbl = await _sugar.Queryable().AS(mainTbl.MainTable).ToDataTableAsync(); - if (!tbl.Columns.Contains(mainTbl.PrimaryKey)) - { - return count; - } - foreach (DataRow row in tbl.Rows) - { - var oldid = row[mainTbl.PrimaryKey].ToString(); - var snowid = SnowflakeIdHelper.NextId(); - count += await _sugar.Updateable().AS(mainTbl.MainTable).Where($"{mainTbl.PrimaryKey}='{oldid}'").SetColumns(mainTbl.PrimaryKey, snowid).ExecuteCommandAsync(); - foreach (var refTbl in mainTbl.RefTables) - { - count += await _sugar.Updateable().AS(refTbl.RefTable).Where($"{refTbl.RefField}='{oldid}'").SetColumns(refTbl.RefField, snowid).ExecuteCommandAsync(); - } - } - return count; - } -} - -public class DbMainTable -{ - public string MainTable { get; set; } - public string PrimaryKey { get; set; } = "f_id"; - public List RefTables { get; set; } = new List(); - public DbMainTable(string tblName) - { - MainTable = tblName; - } -} -public class DbTableRef -{ - public string RefTable { get; set; } - public string RefField { get; set; } - -} \ No newline at end of file diff --git a/extend/Tnb.Extend/DocumentPreview.cs b/extend/Tnb.Extend/DocumentPreview.cs deleted file mode 100644 index 25664920..00000000 --- a/extend/Tnb.Extend/DocumentPreview.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System.Web; -using JNPF.Common.Configuration; -using JNPF.Common.Core.Manager.Files; -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Options; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys.Dto.DocumentPreview; -using JNPF.FriendlyException; -using JNPF.Logging.Attributes; -using Mapster; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Options; - -namespace JNPF.Extend; - -/// -/// 文件预览 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "DocumentPreview", Order = 600)] -[Route("api/extend/[controller]")] -public class DocumentPreview : IDynamicApiController, ITransient -{ - private readonly IFileManager _fileManager; - - public DocumentPreview(IFileManager fileManager) - { - _fileManager = fileManager; - } - - #region Get - - /// - /// 获取文档列表. - /// - /// 请求参数. - /// - [HttpGet("")] - public async Task GetList_Api([FromQuery] KeywordInput input) - { - var filePath = FileVariable.DocumentPreviewFilePath; - var list = await _fileManager.GetObjList(filePath); - list = list.FindAll(x => "xlsx".Equals(x.FileType) || "xls".Equals(x.FileType) || "docx".Equals(x.FileType) || "doc".Equals(x.FileType) || "pptx".Equals(x.FileType) || "ppt".Equals(x.FileType)); - if (input.keyword.IsNotEmptyOrNull()) - list = list.FindAll(x => x.FileName.Contains(input.keyword)); - return list.OrderByDescending(x => x.FileTime).Adapt>(); - } - - /// - /// 文件在线预览. - /// - /// - /// - /// - [HttpGet("{fileId}/Preview")] - public async Task DocumentPreview_Api(string fileId, [FromQuery] DocumentPreviewPreviewInput input) - { - var filePath = FileVariable.DocumentPreviewFilePath; - var files = await _fileManager.GetObjList(filePath); - var file = files.Find(x => x.FileId == fileId); - if (file.IsNotEmptyOrNull()) - { - string domain = App.GetConfig("JNPF_App", true).Domain; - string yozoUrl = App.GetConfig("JNPF_App", true).YOZO.Domain; - string yozoKey = App.GetConfig("JNPF_App", true).YOZO.domainKey; - var url = string.Format("{0}/api/Extend/DocumentPreview/down/{1}", domain, file.FileName); - if (!input.previewType.Equals("localPreview")) - { - url = string.Format("{0}?k={1}&url={2}", yozoUrl, - yozoKey, url, input.noCache, input.watermark, input.isCopy, input.pageStart, input.pageEnd, input.type); - } - return url; - } - else - { - throw Oops.Oh(ErrorCode.D8000); - } - } - - /// - /// 下载. - /// - /// - [HttpGet("down/{fileName}")] - [IgnoreLog] - [AllowAnonymous] - public async Task FileDown(string fileName) - { - var filePath = Path.Combine(FileVariable.DocumentPreviewFilePath, fileName); - var systemFilePath = Path.Combine(FileVariable.SystemFilePath, fileName); - FileStreamResult fileStreamResult = null; - if (await _fileManager.ExistsFile(filePath)) - fileStreamResult = await _fileManager.DownloadFileByType(filePath, fileName); - else - fileStreamResult = await _fileManager.DownloadFileByType(systemFilePath, fileName); - - byte[] bytes = new byte[fileStreamResult.FileStream.Length]; - - fileStreamResult.FileStream.Read(bytes, 0, bytes.Length); - - fileStreamResult.FileStream.Close(); - var httpContext = App.HttpContext; - httpContext.Response.ContentType = "application/octet-stream"; - httpContext.Response.Headers.Add("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); - httpContext.Response.Headers.Add("Content-Length", bytes.Length.ToString()); - httpContext.Response.Body.WriteAsync(bytes); - httpContext.Response.Body.Flush(); - httpContext.Response.Body.Close(); - } - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/DocumentService.cs b/extend/Tnb.Extend/DocumentService.cs deleted file mode 100644 index b04bedd2..00000000 --- a/extend/Tnb.Extend/DocumentService.cs +++ /dev/null @@ -1,446 +0,0 @@ -using JNPF.Common.Core.Manager; -using JNPF.Common.Core.Manager.Files; -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Manager; -using JNPF.Common.Models; -using JNPF.Common.Options; -using JNPF.Common.Security; -using JNPF.DataEncryption; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.Document; -using JNPF.FriendlyException; -using JNPF.Systems.Entitys.Permission; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using Yitter.IdGenerator; - -namespace JNPF.Extend; - -/// -/// 知识管理 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "Document", Order = 601)] -[Route("api/extend/[controller]")] -public class DocumentService : IDynamicApiController, ITransient -{ - private readonly ISqlSugarRepository _repository; - private readonly IFileManager _fileManager; - private readonly ITenant _db; - private readonly IUserManager _userManager; - private readonly ICacheManager _cacheManager; - - public DocumentService(ISqlSugarRepository repository, IFileManager fileManager, IUserManager userManager, ICacheManager cacheManager, ISqlSugarClient context) - { - _repository = repository; - _fileManager = fileManager; - _userManager = userManager; - _cacheManager = cacheManager; - _db = context.AsTenant(); - } - - #region Get - - /// - /// 列表(文件夹树). - /// - /// - [HttpGet("FolderTree/{id}")] - public async Task GetFolderTree(string id) - { - var data = (await _repository.AsQueryable().Where(x => x.CreatorUserId == _userManager.UserId && x.Type == 0 && x.DeleteMark == 0).ToListAsync()).Adapt>(); - data.Add(new DocumentFolderTreeOutput - { - id = "0", - fullName = "全部文档", - parentId = "-1", - icon = "fa fa-folder", - }); - if (!id.Equals("0")) - { - data.RemoveAll(x => x.id == id); - } - var treeList = data.ToTree("-1"); - return new { list = treeList }; - } - - /// - /// 列表(全部文档). - /// - /// 请求参数. - /// 文档层级. - /// - [HttpGet("")] - public async Task GetAllList([FromQuery] KeywordInput input, string parentId) - { - var data = (await _repository.AsQueryable().Where(m => m.CreatorUserId == _userManager.UserId && m.ParentId == parentId && m.DeleteMark == 0) - .WhereIF(input.keyword.IsNotEmptyOrNull(), t => t.FullName.Contains(input.keyword)) - .OrderBy(x => x.SortCode).OrderBy(x => x.CreatorTime, OrderByType.Desc) - .OrderByIF(!string.IsNullOrEmpty(input.keyword), t => t.LastModifyTime, OrderByType.Desc).ToListAsync()).Adapt>(); - string[]? typeList = new string[] { "doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "jpg", "jpeg", "gif", "png", "bmp" }; - foreach (var item in data) - { - string? type = item.fullName.Split('.').LastOrDefault(); - item.isPreview = typeList.Contains(type) ? "1" : null; - } - return new { list = data }; - } - - /// - /// 列表(我的分享). - /// - /// 请求参数. - /// - [HttpGet("Share")] - public async Task GetShareOutList([FromQuery] KeywordInput input) - { - var data = (await _repository.AsQueryable() - .Where(m => m.CreatorUserId == _userManager.UserId && m.IsShare > 0 && m.DeleteMark == 0) - .WhereIF(input.keyword.IsNotEmptyOrNull(), t => t.FullName.Contains(input.keyword)) - .OrderBy(x => x.SortCode).OrderBy(x => x.CreatorTime, OrderByType.Desc) - .OrderByIF(!string.IsNullOrEmpty(input.keyword), t => t.LastModifyTime, OrderByType.Desc).ToListAsync()).Adapt>(); - return new { list = data }; - } - - /// - /// 列表(共享给我). - /// - /// 请求参数. - /// - [HttpGet("ShareTome")] - public async Task GetShareTomeList([FromQuery] KeywordInput input) - { - var output = await _repository.AsSugarClient().Queryable((a, b, c) => new JoinQueryInfos(JoinType.Left, a.Id == b.DocumentId, JoinType.Left, a.CreatorUserId == c.Id)).Where((a, b, c) => a.DeleteMark == 0 && b.ShareUserId == _userManager.UserId).WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.FullName.Contains(input.keyword)).Select((a, b, c) => new DocumentShareTomeOutput() - { - shareTime = a.ShareTime, - fileSize = a.FileSize, - fullName = a.FullName, - id = a.Id, - creatorUserId = SqlFunc.MergeString(c.RealName, "/", c.Account), - fileExtension = a.FileExtension - }).MergeTable().OrderBy(a => a.shareTime, OrderByType.Desc).ToListAsync(); - return new { list = output }; - } - - /// - /// 列表(回收站). - /// - /// 请求参数. - /// - [HttpGet("Trash")] - public async Task GetTrashList([FromQuery] KeywordInput input) - { - var data = (await _repository.AsQueryable() - .Where(m => m.CreatorUserId == _userManager.UserId && m.DeleteMark == 1) - .WhereIF(input.keyword.IsNotEmptyOrNull(), t => t.FullName.Contains(input.keyword)) - .OrderBy(x => x.SortCode).OrderBy(x => x.CreatorTime, OrderByType.Desc) - .OrderByIF(!string.IsNullOrEmpty(input.keyword), t => t.LastModifyTime, OrderByType.Desc).ToListAsync()).Adapt>(); - return new { list = data }; - } - - /// - /// 列表(共享人员). - /// - /// 文档主键. - /// - [HttpGet("ShareUser/{documentId}")] - public async Task GetShareUserList(string documentId) - { - var data = (await _repository.AsSugarClient().Queryable().Where(x => x.DocumentId == documentId).OrderBy(x => x.ShareTime, OrderByType.Desc).ToListAsync()).Adapt>(); - return new { list = data }; - } - - /// - /// 信息. - /// - /// 主键值. - /// - [HttpGet("{id}")] - public async Task GetInfo(string id) - { - var data = (await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == 0)).Adapt(); - if (data.type == 1) - { - data.fullName = data.fullName.Replace("." + data.fileExtension, string.Empty); - } - return data; - } - #endregion - - #region Post - - /// - /// 新建. - /// - /// 实体对象. - /// - [HttpPost("")] - public async Task Create([FromBody] DocumentCrInput input) - { - if (await _repository.IsAnyAsync(x => x.FullName == input.fullName && x.CreatorUserId == _userManager.UserId && x.Type == 0 && x.DeleteMark != 1)) - throw Oops.Oh(ErrorCode.COM1004); - var entity = input.Adapt(); - entity.DeleteMark = 0; - var isOk = await _repository.AsSugarClient().Insertable(entity).IgnoreColumns(ignoreNullColumn: true).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1000); - } - - /// - /// 更新. - /// - /// 主键值. - /// 实体对象. - /// - [HttpPut("{id}")] - public async Task Update(string id, [FromBody] DocumentUpInput input) - { - if (await _repository.IsAnyAsync(x => x.Id != id && x.Type == input.type && x.FullName == input.fullName && x.DeleteMark != 1)) - throw Oops.Oh(ErrorCode.COM1004); - var entity = await _repository.GetFirstAsync(x => x.Id == id); - entity.FullName = string.Format("{0}.{1}", input.fullName, entity.FileExtension); - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1001); - } - - /// - /// 删除. - /// - /// 主键值. - /// - [HttpDelete("{id}")] - public async Task Delete(string id) - { - if (await _repository.IsAnyAsync(x => x.ParentId == id && x.DeleteMark != 1)) - throw Oops.Oh(ErrorCode.Ex0006); - var entity = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark != 1); - if (entity == null) - throw Oops.Oh(ErrorCode.COM1005); - var isOk = await _repository.AsSugarClient().Updateable(entity).CallEntityMethod(m => m.Delete()).UpdateColumns(it => new { it.DeleteMark, it.DeleteTime, it.DeleteUserId }).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1002); - } - - /// - /// 上传文件. - /// - /// - [HttpPost("Uploader")] - public async Task Uploader([FromForm] DocumentUploaderInput input) - { - #region 上传图片 - if (await _repository.IsAnyAsync(x => x.FullName == input.file.FileName && x.Type == 1 && x.DeleteMark != 1)) - throw Oops.Oh(ErrorCode.D8002); - var stream = input.file.OpenReadStream(); - var _filePath = _fileManager.GetPathByType("document"); - await _fileManager.UploadFileByType(stream, _filePath, input.file.FileName); - Thread.Sleep(1000); - #endregion - - #region 保存数据 - var entity = new DocumentEntity(); - entity.Type = 1; - entity.FullName = input.file.FileName; - entity.ParentId = input.parentId; - entity.FileExtension = Path.GetExtension(input.file.FileName).Replace(".", string.Empty); - entity.FilePath = Path.Combine(_filePath, input.file.FileName); - entity.FileSize = input.file.Length.ToString(); - entity.DeleteMark = 0; - entity.UploaderUrl = string.Format("/api/file/Image/document/{0}", entity.FilePath); - var isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.D8001); - #endregion - } - - /// - /// 分片组装. - /// - /// 请求参数. - [HttpPost("merge")] - public async Task merge([FromForm] ChunkModel input) - { - if (await _repository.IsAnyAsync(x =>x.CreatorUserId==_userManager.UserId && x.FullName == input.fileName && x.Type == 1 && x.DeleteMark != 1)) - { - //string directoryPath = Path.Combine(App.GetConfig("JNPF_App", true).SystemPath, "TemporaryFile", input.identifier); - //FileHelper.DeleteDirectory(directoryPath); - //throw Oops.Oh(ErrorCode.D8002); - input.fileName = string.Format("{0}-{1}", DateTime.Now.ParseToUnixTime(), input.fileName); - } - input.isUpdateName = false; - input.type = "document"; - var _filePath = _fileManager.GetPathByType(input.type); - var output = await _fileManager.Merge(input); - #region 保存数据 - var entity = new DocumentEntity(); - entity.Type = 1; - entity.FullName = input.fileName; - entity.ParentId = input.parentId; - entity.FileExtension = input.extension; - entity.FilePath = output.name; - entity.FileSize = input.fileSize; - entity.DeleteMark = 0; - entity.UploaderUrl = string.Format("/api/file/Image/document/{0}", entity.FilePath); - var isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.D8001); - #endregion - return output; - } - - /// - /// 下载文件. - /// - /// 主键值. - [HttpPost("Download/{id}")] - public async Task Download(string id) - { - var entity = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == 0); - if (entity == null) - throw Oops.Oh(ErrorCode.D8000); - var fileName = _userManager.UserId + "|" + entity.FilePath + "|document"; - _cacheManager.Set(entity.FilePath, string.Empty); - return new { - name = entity.FullName, - url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "JNPF") - }; - } - - /// - /// 回收站(彻底删除). - /// - /// 主键值. - /// - [HttpDelete("Trash/{id}")] - public async Task TrashDelete(string id) - { - var list = await _repository.AsQueryable().Where(m => m.ParentId == id && m.Type == 1 && m.CreatorUserId == _userManager.UserId && m.DeleteMark == 1).ToListAsync(); - foreach (var item in list) - { - if (item.Type == 1) - { - await _fileManager.DeleteFile(item.FilePath); - } - await _repository.AsSugarClient().Deleteable().Where(m => m.Id == item.Id && m.CreatorUserId == _userManager.UserId).ExecuteCommandHasChangeAsync(); - } - var isOk = await _repository.AsSugarClient().Deleteable().Where(m => m.Id == id && m.CreatorUserId == _userManager.UserId).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1002); - } - - /// - /// 回收站(还原文件). - /// - /// 主键值. - /// - [HttpPost("Trash/{id}/Actions/Recovery")] - public async Task TrashRecovery(string id) - { - var entity = await _repository.GetFirstAsync(x => x.Id == id); - if (!await _repository.IsAnyAsync(x => x.Id == entity.ParentId && x.DeleteMark == 0) && entity.ParentId != "0") throw Oops.Oh(ErrorCode.Ex0007); - entity.DeleteMark = 0; - entity.DeleteTime = null; - entity.DeleteUserId = null; - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1001); - } - - /// - /// 共享文件(创建). - /// - /// 共享文件id. - /// 共享人. - /// - [HttpPost("{id}/Actions/Share")] - public async Task ShareCreate(string id, [FromBody] DocumentActionsShareInput input) - { - try - { - var userIds = input.userId.Split(","); - List documentShareEntityList = new List(); - foreach (var item in userIds) - { - documentShareEntityList.Add(new DocumentShareEntity - { - Id = YitIdHelper.NextId().ToString(), - DocumentId = id, - ShareUserId = item, - ShareTime = DateTime.Now, - }); - } - - var entity = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == 0); - entity.IsShare = documentShareEntityList.Count; - entity.ShareTime = DateTime.Now; - _db.BeginTran(); - _repository.AsSugarClient().Deleteable().Where(x => x.DocumentId == id).ExecuteCommand(); - _repository.AsSugarClient().Insertable(documentShareEntityList).ExecuteCommand(); - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1001); - _db.CommitTran(); - } - catch (Exception ex) - { - _db.RollbackTran(); - } - } - - /// - /// 共享文件(取消). - /// - /// 主键值. - /// - [HttpDelete("{id}/Actions/Share")] - public async Task ShareCancel(string id) - { - try - { - var entity = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == 0); - entity.IsShare = 0; - entity.ShareTime = DateTime.Now; - _db.BeginTran(); - _repository.AsSugarClient().Deleteable().Where(x => x.DocumentId == id).ExecuteCommand(); - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1001); - _db.CommitTran(); - } - catch (Exception) - { - - throw; - } - } - - /// - /// 文件/夹移动到. - /// - /// 主键值 - /// 将要移动到Id - /// - [HttpPut("{id}/Actions/MoveTo/{toId}")] - public async Task MoveTo(string id, string toId) - { - var entity = await _repository.GetFirstAsync(x => x.Id == id); - var entityTo = await _repository.GetFirstAsync(x => x.Id == toId); - if (id == toId && entity.Type == 0 && entityTo.Type == 0) - throw Oops.Oh(ErrorCode.Ex0002); - if (entityTo.IsNotEmptyOrNull() && id == entityTo.ParentId && entity.Type == 0 && entityTo.Type == 0) - throw Oops.Oh(ErrorCode.Ex0005); - entity.ParentId = toId; - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1001); - } - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/EmailService.cs b/extend/Tnb.Extend/EmailService.cs deleted file mode 100644 index bc67f23d..00000000 --- a/extend/Tnb.Extend/EmailService.cs +++ /dev/null @@ -1,583 +0,0 @@ -using System.Web; -using JNPF.Common.Configuration; -using JNPF.Common.Core.Manager; -using JNPF.Common.Core.Manager.Files; -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Models; -using JNPF.Common.Options; -using JNPF.Common.Security; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.Email; -using JNPF.Extras.Thirdparty.Email; -using JNPF.FriendlyException; -using JNPF.LinqBuilder; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json.Linq; -using SqlSugar; - -namespace JNPF.Extend; - -/// -/// 邮件收发 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "Email", Order = 600)] -[Route("api/extend/[controller]")] -public class EmailService : IDynamicApiController, ITransient -{ - private readonly ISqlSugarRepository _repository; - private readonly ITenant _db; - private readonly IUserManager _userManager; - private readonly IFileManager _fileManager; - - public EmailService(ISqlSugarRepository repository, IUserManager userManager, ISqlSugarClient context, IFileManager fileManager) - { - _repository = repository; - _userManager = userManager; - _db = context.AsTenant(); - _fileManager = fileManager; - } - - #region Get - - /// - /// (带分页)获取邮件列表(收件箱、标星件、草稿箱、已发送). - /// - /// 请求参数 - /// - [HttpGet("")] - public async Task GetList([FromQuery] EmailListQuery input) - { - switch (input.type) - { - case "inBox"://收件箱 - return await GetReceiveList(input); - case "star"://标星件 - return await GetStarredList(input); - case "draft"://草稿箱 - return await GetDraftList(input); - case "sent"://已发送 - return await GetSentList(input); - default: - return PageResult.SqlSugarPageResult(new SqlSugarPagedList()); - } - } - - /// - /// 信息(收件/发件). - /// - /// 主键值. - /// - [HttpGet("{id}")] - public async Task GetInfo_Api(string id) - { - var output = new EmailInfoOutput(); - var data = await GetInfo(id); - var jobj = data.ToObject(); - if (jobj.ContainsKey("Read")) - { - var entity = data.Adapt(); - output = entity.Adapt(); - output.bodyText = HttpUtility.HtmlDecode(entity.BodyText); - } - else - { - var entity = data.Adapt(); - output = entity.Adapt(); - output.bodyText = HttpUtility.HtmlDecode(entity.BodyText); - } - return output; - } - - /// - /// 信息(配置). - /// - /// - [HttpGet("Config")] - public async Task GetConfigInfo_Api() - { - return (await GetConfigInfo()).Adapt(); - } - - #endregion - - #region Post - - /// - /// 删除. - /// - /// 主键值. - /// - [HttpDelete("{id}")] - public async Task Delete(string id) - { - try - { - _db.BeginTran(); - - var entity = await GetInfo(id); - if (entity is EmailReceiveEntity) - { - //删除邮件 - var mailConfig = await GetConfigInfo(); - var mailReceiveEntity = entity as EmailReceiveEntity; - MailUtil.Delete(new MailParameterInfo { Account = mailConfig.Account, Password = mailConfig.Password, POP3Host = mailConfig.POP3Host, POP3Port = mailConfig.POP3Port.ParseToInt() }, mailReceiveEntity.MID); - } - //删除数据 - var isOk = false; - if (entity is EmailReceiveEntity) - isOk = await _repository.AsSugarClient().Updateable((EmailReceiveEntity)entity).CallEntityMethod(m => m.Delete()).UpdateColumns(it => new { it.DeleteMark, it.DeleteTime, it.DeleteUserId }).ExecuteCommandHasChangeAsync(); - else - isOk = await _repository.AsSugarClient().Updateable((EmailSendEntity)entity).CallEntityMethod(m => m.Delete()).UpdateColumns(it => new { it.DeleteMark, it.DeleteTime, it.DeleteUserId }).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1002); - - _db.CommitTran(); - } - catch (Exception ex) - { - _db.RollbackTran(); - throw Oops.Oh(ErrorCode.COM1002); - } - } - - /// - /// 设置已读邮件. - /// - /// - /// - [HttpPut("{id}/Actions/Read")] - public async Task ReceiveRead(string id) - { - var isOk = await _repository.AsSugarClient().Updateable().SetColumns(it => new EmailReceiveEntity() - { - Read = 1, - LastModifyUserId = _userManager.UserId, - LastModifyTime = SqlFunc.GetDate() - }).Where(it => it.Id.Equals(id)).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1008); - } - - /// - /// 设置未读邮件. - /// - /// - /// - [HttpPut("{id}/Actions/Unread")] - public async Task ReceiveUnread(string id) - { - var isOk = await _repository.AsSugarClient().Updateable().SetColumns(it => new EmailReceiveEntity() - { - Read = 0, - LastModifyUserId = _userManager.UserId, - LastModifyTime = SqlFunc.GetDate() - }).Where(it => it.Id.Equals(id)).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1008); - } - - /// - /// 设置星标邮件 - /// - /// - /// - [HttpPut("{id}/Actions/Star")] - public async Task ReceiveYesStarred(string id) - { - var isOk = await _repository.AsSugarClient().Updateable().SetColumns(it => new EmailReceiveEntity() - { - Starred = 1, - LastModifyUserId = _userManager.UserId, - LastModifyTime = SqlFunc.GetDate() - }).Where(it => it.Id.Equals(id)).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1008); - } - - /// - /// 设置取消星标. - /// - /// - /// - [HttpPut("{id}/Actions/Unstar ")] - public async Task ReceiveNoStarred(string id) - { - var isOk = await _repository.AsSugarClient().Updateable().SetColumns(it => new EmailReceiveEntity() - { - Starred = 0, - LastModifyUserId = _userManager.UserId, - LastModifyTime = SqlFunc.GetDate() - }).Where(it => it.Id.Equals(id)).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1008); - } - - /// - /// 收邮件. - /// - /// - [HttpPost("Receive")] - public async Task Receive() - { - var mailConfig = await GetConfigInfo(); - if (mailConfig != null) - { - var mailAccount = mailConfig.Adapt(); - if (MailUtil.CheckConnected(mailAccount)) - { - new List(); - var startTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00"); - var endTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " 23:59"); - var receiveCount = await _repository.AsSugarClient().Queryable().CountAsync(x => x.MAccount == mailConfig.Account && SqlFunc.Between(x.CreatorTime, startTime, endTime)); - List entitys = MailUtil.Get(mailAccount, receiveCount).Select(item => new EmailReceiveEntity - { - MAccount = mailConfig.Account, - MID = item.UID, - Sender = item.To, - SenderName = item.ToName, - Subject = item.Subject, - BodyText = HttpUtility.HtmlEncode(item.BodyText), - Attachment = item.Attachment.ToJsonString(), - Date = item.Date, - Read = 0 - }).ToList(); - - if (entitys.Count > 0) - { - await _repository.AsSugarClient().Insertable(entitys).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - } - - return entitys.Count; - } - else - { - throw Oops.Oh(ErrorCode.Ex0003); - } - } - else - { - throw Oops.Oh(ErrorCode.Ex0004); - } - } - - /// - /// 存草稿. - /// - /// 对象实体. - /// - [HttpPost("Actions/SaveDraft")] - public async Task SaveDraft([FromBody] EmailActionsSaveDraftInput input) - { - var entity = input.Adapt(); - entity.BodyText = HttpUtility.HtmlEncode(entity.BodyText); - entity.To = input.recipient; - entity.Sender = App.GetConfig("JNPF_App", true).ErrorReportTo; - var isOk = 0; - entity.State = -1; - if (entity.Id.IsEmpty()) - { - isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - } - else - { - isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandAsync(); - } - - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1008); - } - - /// - /// 发邮件. - /// - /// 对象实体. - /// - [HttpPost("")] - public async Task SaveSent([FromBody] EmailSendInput input) - { - var entity = input.Adapt(); - var mailConfig = await GetConfigInfo(); - foreach (var item in input.recipient.Split(",")) - { - if (!item.IsEmail()) - throw Oops.Oh(ErrorCode.Ex0003); - if (mailConfig != null) - { - entity.BodyText = HttpUtility.HtmlEncode(entity.BodyText); - entity.To = item; - entity.Sender = App.GetConfig("JNPF_App", true).ErrorReportTo; - entity.State = 1; - var isOk = 0; - if (entity.Id.IsEmpty()) - { - entity.Sender = mailConfig.Account; - isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - } - else - { - isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandAsync(); - } - //拷贝文件,注意:从临时文件夹拷贝到邮件文件夹 - var attachmentList = entity.Attachment.ToList(); - var temporaryFile = FileVariable.TemporaryFilePath; - var mailFilePath = FileVariable.EmailFilePath; - foreach (MailFileParameterInfo mailFile in attachmentList) - { - FileHelper.MoveFile(Path.Combine(temporaryFile, mailFile.fileId), Path.Combine(mailFilePath, mailFile.fileId)); - mailFile.fileName = mailFile.name; - } - //发送邮件 - var mailModel = new MailInfo(); - mailModel.To = entity.To; - mailModel.CC = entity.CC; - mailModel.Bcc = entity.BCC; - mailModel.Subject = entity.Subject; - mailModel.BodyText = HttpUtility.HtmlDecode(entity.BodyText); - mailModel.Attachment = attachmentList; - MailUtil.Send(new MailParameterInfo { AccountName = mailConfig.SenderName, Account = mailConfig.Account, Password = mailConfig.Password, SMTPHost = mailConfig.SMTPHost, SMTPPort = mailConfig.SMTPPort.ParseToInt(), Ssl = mailConfig.Ssl == 1 }, mailModel); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1008); - } - else - { - throw Oops.Oh(ErrorCode.Ex0004); - } - } - } - - /// - /// 保存邮箱配置 - /// - /// 对象实体 - /// - [HttpPut("Config")] - public async Task SaveConfig([FromBody] EmailConfigUpInput input) - { - var entity = input.Adapt(); - var data = await GetConfigInfo(); - var isOk = 0; - if (data == null) - { - isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - } - else - { - entity.Id = data.Id; - isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); - } - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1008); - } - - /// - /// 邮箱账户密码验证. - /// - /// 对象实体 - [HttpPost("Config/Actions/CheckMail")] - public void CheckLogin([FromBody] EmailConfigActionsCheckMailInput input) - { - var entity = input.Adapt(); - if (!MailUtil.CheckConnected(entity.Adapt())) - throw Oops.Oh(ErrorCode.Ex0003); - } - - /// - /// 下载附件. - /// - /// 文件对象 - [HttpPost("Download")] - public async Task Download(AnnexModel fileModel) - { - var filePath = Path.Combine(FileVariable.EmailFilePath, fileModel.FileId); - if (await _fileManager.ExistsFile(filePath)) - { - _fileManager.DownloadFileByType(filePath, fileModel.FileName); - } - } - - #endregion - - #region PrivateMethod - - /// - /// 信息(配置). - /// - /// - private async Task GetConfigInfo() - { - return await _repository.AsSugarClient().Queryable().FirstAsync(x => x.CreatorUserId == _userManager.UserId); - } - - /// - /// 列表(收件箱). - /// - /// - /// - private async Task GetReceiveList(EmailListQuery input) - { - var whereLambda = LinqExpression.And(); - whereLambda = whereLambda.And(x => x.CreatorUserId == _userManager.UserId && x.DeleteMark == null); - if (input.endTime != null && input.startTime != null) - { - var start = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 00:00:00}", input.startTime?.TimeStampToDateTime())); - var end = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 23:59:59}", input.endTime?.TimeStampToDateTime())); - whereLambda = whereLambda.And(x => SqlFunc.Between(x.Date, start, end)); - } - if (!string.IsNullOrEmpty(input.keyword)) - { - whereLambda = whereLambda.And(m => m.Sender.Contains(input.keyword) || m.Subject.Contains(input.keyword)); - } - var list = await _repository.AsSugarClient().Queryable().Where(whereLambda) - .OrderBy(x => x.Date, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize); - var pageList = new SqlSugarPagedList() - { - list = list.list.Adapt>(), - pagination = list.pagination - }; - return PageResult.SqlSugarPageResult(pageList); - } - - /// - /// 列表(未读邮件). - /// - /// - /// - private async Task GetUnreadList(EmailListQuery input) - { - var whereLambda = LinqExpression.And(); - whereLambda = whereLambda.And(x => x.CreatorUserId == _userManager.UserId && x.Read == 0 && x.DeleteMark == null); - if (input.endTime != null && input.startTime != null) - { - var start = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 00:00:00}", input.startTime?.TimeStampToDateTime())); - var end = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 23:59:59}", input.endTime?.TimeStampToDateTime())); - whereLambda = whereLambda.And(x => SqlFunc.Between(x.CreatorTime, start, end)); - } - if (!string.IsNullOrEmpty(input.keyword)) - { - whereLambda = whereLambda.And(m => m.Sender.Contains(input.keyword) || m.Subject.Contains(input.keyword)); - } - var list = await _repository.AsSugarClient().Queryable().Where(whereLambda).OrderBy(x => x.Date, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize); - var pageList = new SqlSugarPagedList() - { - list = list.list.Adapt>(), - pagination = list.pagination - }; - return PageResult.SqlSugarPageResult(pageList); - } - - /// - /// 列表(星标件). - /// - /// - /// - private async Task GetStarredList(EmailListQuery input) - { - var whereLambda = LinqExpression.And(); - whereLambda = whereLambda.And(x => x.CreatorUserId == _userManager.UserId && x.Starred == 1 && x.DeleteMark == null); - if (input.endTime != null && input.startTime != null) - { - var start = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 00:00:00}", input.startTime?.TimeStampToDateTime())); - var end = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 23:59:59}", input.endTime?.TimeStampToDateTime())); - whereLambda = whereLambda.And(x => SqlFunc.Between(x.CreatorTime, start, end)); - } - //关键字(用户、IP地址、功能名称) - if (!string.IsNullOrEmpty(input.keyword)) - { - whereLambda = whereLambda.And(m => m.Sender.Contains(input.keyword) || m.Subject.Contains(input.keyword)); - } - var list = await _repository.AsSugarClient().Queryable().Where(whereLambda).OrderBy(x => x.Date, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize); - var pageList = new SqlSugarPagedList() - { - list = list.list.Adapt>(), - pagination = list.pagination - }; - return PageResult.SqlSugarPageResult(pageList); - } - - /// - /// 列表(草稿箱). - /// - /// - /// - private async Task GetDraftList(EmailListQuery input) - { - var whereLambda = LinqExpression.And(); - whereLambda = whereLambda.And(x => x.CreatorUserId == _userManager.UserId && x.State == -1 && x.DeleteMark == null); - if (input.endTime != null && input.startTime != null) - { - var start = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 00:00:00}", input.startTime?.TimeStampToDateTime())); - var end = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 23:59:59}", input.endTime?.TimeStampToDateTime())); - whereLambda = whereLambda.And(x => SqlFunc.Between(x.CreatorTime, start, end)); - } - if (!string.IsNullOrEmpty(input.keyword)) - { - whereLambda = whereLambda.And(m => m.Sender.Contains(input.keyword) || m.Subject.Contains(input.keyword)); - } - var list = await _repository.AsSugarClient().Queryable().Where(whereLambda).OrderBy(x => x.CreatorTime, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize); - var pageList = new SqlSugarPagedList() - { - list = list.list.Adapt>(), - pagination = list.pagination - }; - return PageResult.SqlSugarPageResult(pageList); - } - - /// - /// 列表(已发送). - /// - /// - /// - private async Task GetSentList(EmailListQuery input) - { - var whereLambda = LinqExpression.And(); - whereLambda = whereLambda.And(x => x.CreatorUserId == _userManager.UserId && x.State != -1 && x.DeleteMark == null); - if (input.endTime != null && input.startTime != null) - { - var start = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 00:00:00}", input.startTime?.TimeStampToDateTime())); - var end = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 23:59:59}", input.endTime?.TimeStampToDateTime())); - whereLambda = whereLambda.And(x => SqlFunc.Between(x.CreatorTime, start, end)); - } - if (!string.IsNullOrEmpty(input.keyword)) - { - whereLambda = whereLambda.And(m => m.Sender.Contains(input.keyword) || m.Subject.Contains(input.keyword)); - } - var list = await _repository.AsSugarClient().Queryable().Where(whereLambda).OrderBy(x => x.CreatorTime, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize); - var pageList = new SqlSugarPagedList() - { - list = list.list.Adapt>(), - pagination = list.pagination - }; - return PageResult.SqlSugarPageResult(pageList); - } - - /// - /// 信息. - /// - /// - /// - private async Task GetInfo(string id) - { - var entity = new object(); - if (await _repository.AsSugarClient().Queryable().AnyAsync(x => x.Id == id && x.DeleteMark == null)) - { - var receiveInfo = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.Id == id && x.DeleteMark == null); - receiveInfo.Read = 1; - await _repository.AsSugarClient().Updateable(receiveInfo).CallEntityMethod(m => m.LastModify()).UpdateColumns(x => new { x.LastModifyTime, x.LastModifyUserId, x.Read }).ExecuteCommandHasChangeAsync(); - entity = receiveInfo; - } - else - { - entity = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.Id == id && x.DeleteMark == null); - } - return entity; - } - #endregion -} diff --git a/extend/Tnb.Extend/EmployeeService.cs b/extend/Tnb.Extend/EmployeeService.cs deleted file mode 100644 index fa4ac24e..00000000 --- a/extend/Tnb.Extend/EmployeeService.cs +++ /dev/null @@ -1,419 +0,0 @@ -using JNPF.Common.Configuration; -using JNPF.Common.Core.Manager; -using JNPF.Common.Core.Manager.Files; -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Helper; -using JNPF.Common.Manager; -using JNPF.Common.Models.NPOI; -using JNPF.Common.Security; -using JNPF.DataEncryption; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.Employee; -using JNPF.FriendlyException; -using JNPF.LinqBuilder; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; - -namespace JNPF.Extend; - -/// -/// 职员管理(导入导出) -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "Employee", Order = 600)] -[Route("api/extend/[controller]")] -public class EmployeeService : IDynamicApiController, ITransient -{ - private readonly ISqlSugarRepository _repository; - private readonly IFileManager _fileManager; - private readonly IUserManager _userManager; - private readonly ICacheManager _cacheManager; - - public EmployeeService(ISqlSugarRepository repository, IFileManager fileManager, IUserManager userManager,ICacheManager cacheManager) - { - _repository = repository; - _fileManager = fileManager; - _userManager = userManager; - _cacheManager = cacheManager; - } - - #region GET - - /// - /// 列表. - /// - /// 请求参数. - /// - [HttpGet("")] - public async Task GetList([FromQuery] EmployeeListQuery input) - { - var whereLambda = LinqExpression.And(); - whereLambda = whereLambda.And(x => x.DeleteMark == null); - if (input.condition.IsNotEmptyOrNull() && input.keyword.IsNotEmptyOrNull()) - { - string propertyName = input.condition; - string propertyValue = input.keyword; - switch (propertyName) - { - case "EnCode": // 工号 - whereLambda = whereLambda.And(t => t.EnCode.Contains(propertyValue)); - break; - case "FullName": // 姓名 - whereLambda = whereLambda.And(t => t.FullName.Contains(propertyValue)); - break; - case "Telephone": // 电话 - whereLambda = whereLambda.And(t => t.Telephone.Contains(propertyValue)); - break; - case "DepartmentName": // 部门 - whereLambda = whereLambda.And(t => t.DepartmentName.Contains(propertyValue)); - break; - case "PositionName": // 职位 - whereLambda = whereLambda.And(t => t.PositionName.Contains(propertyValue)); - break; - } - } - - var list = await _repository.AsQueryable().Where(whereLambda) - .OrderBy(x => x.SortCode).OrderBy(x => x.CreatorTime, OrderByType.Desc) - .OrderByIF(!string.IsNullOrEmpty(input.keyword), t => t.LastModifyTime, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize); - var pageList = new SqlSugarPagedList() - { - list = list.list.Adapt>(), - pagination = list.pagination - }; - return PageResult.SqlSugarPageResult(pageList); - } - - /// - /// 信息 - /// - /// 主键值 - /// - [HttpGet("{id}")] - public async Task GetInfo(string id) - { - return await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null); - } - - /// - /// 导入预览. - /// - /// - [HttpGet("ImportPreview")] - public async Task ImportPreview(string fileName) - { - try - { - var filePath = FileVariable.TemporaryFilePath; - var savePath = Path.Combine(filePath, fileName); - //得到数据 - var sr = await _fileManager.GetFileStream(savePath); - var excelData = ExcelImportHelper.ToDataTable(savePath, sr); - excelData.Rows.RemoveAt(0); - foreach (var item in excelData.Columns) - { - excelData.Columns[item.ToString()].ColumnName = GetFiledEncode(item.ToString()); - } - //删除文件 - _fileManager.DeleteFile(savePath); - //返回结果 - return new { dataRow = excelData }; - } - catch (Exception ex) - { - - throw Oops.Oh(ErrorCode.D1801); - } - } - #endregion - - #region POST - - /// - /// 新建. - /// - /// 实体对象 - /// - [HttpPost("")] - public async Task Create(EmployeeEntity entity) - { - var isOk = await _repository.AsSugarClient().Insertable(entity).IgnoreColumns(ignoreNullColumn: true).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1000); - } - - /// - /// 更新. - /// - /// 主键值 - /// 实体对象 - /// - [HttpPut("{id}")] - public async Task Update(string id, EmployeeEntity entity) - { - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1001); - } - - /// - /// 删除 - /// - /// 主键值 - /// - [HttpDelete("{id}")] - public async Task Delete(string id) - { - var entity = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null); - var isOk = await _repository.AsSugarClient().Updateable(entity).CallEntityMethod(m => m.Delete()).UpdateColumns(it => new { it.DeleteMark, it.DeleteTime, it.DeleteUserId }).ExecuteCommandHasChangeAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1002); - } - - /// - /// 导出. - /// - [HttpGet("ExportExcelData")] - public async Task ExportExcelData([FromQuery] EmployeeListQuery input) - { - var dataList = new List(); - if (input.dataType == "0") - { - dataList = await GetPageListData(input); - } - else - { - dataList = await GetListData(); - } - ExcelConfig excelconfig = new ExcelConfig(); - excelconfig.FileName = "职员信息.xls"; - excelconfig.HeadFont = "微软雅黑"; - excelconfig.HeadPoint = 10; - excelconfig.IsAllSizeColumn = true; - excelconfig.ColumnModel = new List(); - var filedList = input.selectKey.Split(","); - excelconfig.ColumnModel = input.selectKey.Split(",").Select(item => new ExcelColumnModel() { Column = item.ToUpperCase(), ExcelColumn = GetFiledName(item) }).ToList(); - var addPath = Path.Combine(FileVariable.TemporaryFilePath, excelconfig.FileName); - var stream = ExcelExportHelper.ExportMemoryStream(dataList, excelconfig); - await _fileManager.UploadFileByType(stream, FileVariable.TemporaryFilePath, excelconfig.FileName); - _cacheManager.Set(excelconfig.FileName, string.Empty); - return new { name = excelconfig.FileName, url = "/api/file/Download?encryption=" + DESCEncryption.Encrypt(_userManager.UserId + "|" + excelconfig.FileName + "|" + addPath, "JNPF") }; - } - - /// - /// 上传文件. - /// - /// - [HttpPost("Uploader")] - public async Task Uploader(IFormFile file) - { - var _filePath = _fileManager.GetPathByType(string.Empty); - var _fileName = DateTime.Now.ToString("yyyyMMdd") + "_" + SnowflakeIdHelper.NextId() + Path.GetExtension(file.FileName); - var stream = file.OpenReadStream(); - await _fileManager.UploadFileByType(stream, _filePath, _fileName); - _cacheManager.Set(_fileName, string.Empty); - return new { name = _fileName, url = string.Format("/api/File/Image/{0}/{1}", string.Empty, _fileName) }; - } - - /// - /// 导入数据. - /// - /// 请求参数 - /// - [HttpPost("ImportData")] - public async Task ImportData_Api([FromBody] ImportDataInput input) - { - var output = new ImportDataOutput(); - foreach (var item in input.list) - { - try - { - var entity = item.Adapt(); - var isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - if (isOk < 1) - { - output.failResult.Add(item); - output.fnum++; - } - else - { - output.snum++; - } - } - catch (Exception) - { - output.failResult.Add(item); - output.fnum++; - } - } - if (output.snum == input.list.Count) - { - output.resultType = 0; - } - return output; - } - - /// - /// 模板下载. - /// - [HttpGet("TemplateDownload")] - public async Task TemplateDownload() - { - var filePath = Path.Combine(FileVariable.TemplateFilePath, "employee_import_template.xlsx"); //模板路径 - var addFilePath = Path.Combine(FileVariable.TemplateFilePath, "职员信息.xlsx"); // 保存路径 - if (!(await _fileManager.ExistsFile(addFilePath))) - { - var stream = await _fileManager.GetFileStream(filePath); - await _fileManager.UploadFileByType(stream, FileVariable.TemporaryFilePath, "职员信息.xlsx"); - _cacheManager.Set("职员信息.xlsx", string.Empty); - } - return new { name = "职员信息.xlsx", url = "/api/file/Download?encryption=" + DESCEncryption.Encrypt(_userManager.UserId + "|职员信息.xlsx", "JNPF") }; - } - #endregion - - #region PrivateMethod - - /// - /// 列表. - /// - /// - private async Task> GetListData() - { - return await _repository.AsQueryable().Where(x => x.DeleteMark == null).OrderBy(x => x.CreatorTime, OrderByType.Desc).ToListAsync(); - } - - /// - /// 分页列表. - /// - /// - /// - private async Task> GetPageListData(EmployeeListQuery input) - { - var whereLambda = LinqExpression.And(); - whereLambda = whereLambda.And(x => x.DeleteMark == null); - if (input.condition.IsNotEmptyOrNull() && input.keyword.IsNotEmptyOrNull()) - { - string propertyName = input.condition; - string propertyValue = input.keyword; - switch (propertyName) - { - case "EnCode": //工号 - whereLambda = whereLambda.And(t => t.EnCode.Contains(propertyValue)); - break; - case "FullName": //姓名 - whereLambda = whereLambda.And(t => t.FullName.Contains(propertyValue)); - break; - case "Telephone": //电话 - whereLambda = whereLambda.And(t => t.Telephone.Contains(propertyValue)); - break; - case "DepartmentName": //部门 - whereLambda = whereLambda.And(t => t.DepartmentName.Contains(propertyValue)); - break; - case "PositionName": //职位 - whereLambda = whereLambda.And(t => t.PositionName.Contains(propertyValue)); - break; - default: - break; - } - } - var list = await _repository.AsQueryable().Where(whereLambda).OrderBy(x => x.CreatorTime, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize); - return list.list.Adapt>(); - } - - /// - /// 获取字段编码. - /// - /// - /// - private string GetFiledEncode(string filed) - { - switch (filed) - { - case "工号": - return "enCode"; - case "姓名": - return "fullName"; - case "性别": - return "gender"; - case "部门": - return "departmentName"; - case "岗位": - return "positionName"; - case "用工性质": - return "workingNature"; - case "身份证号": - return "idNumber"; - case "联系电话": - return "telephone"; - case "出生年月": - return "birthday"; - case "参加工作": - return "attendWorkTime"; - case "最高学历": - return "education"; - case "所学专业": - return "major"; - case "毕业院校": - return "graduationAcademy"; - case "毕业时间": - return "graduationTime"; - case "创建时间": - return "creatorTime"; - default: - return string.Empty; - } - } - - /// - /// 获取字段名称. - /// - /// - /// - private string GetFiledName(string filed) - { - switch (filed) - { - case "enCode": - return "工号"; - case "fullName": - return "姓名"; - case "gender": - return "性别"; - case "departmentName": - return "部门"; - case "positionName": - return "岗位"; - case "workingNature": - return "用工性质"; - case "idNumber": - return "身份证号"; - case "telephone": - return "联系电话"; - case "birthday": - return "出生年月"; - case "attendWorkTime": - return "参加工作"; - case "education": - return "最高学历"; - case "major": - return "所学专业"; - case "graduationAcademy": - return "毕业院校"; - case "graduationTime": - return "毕业时间"; - case "creatorTime": - return "创建时间"; - default: - return string.Empty; - } - } - #endregion -} diff --git a/extend/Tnb.Extend/OrderService.cs b/extend/Tnb.Extend/OrderService.cs deleted file mode 100644 index a99b328c..00000000 --- a/extend/Tnb.Extend/OrderService.cs +++ /dev/null @@ -1,322 +0,0 @@ -using System.Data; -using JNPF.Common.Configuration; -using JNPF.Common.Const; -using JNPF.Common.Core.Manager; -using JNPF.Common.Core.Manager.Files; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Manager; -using JNPF.Common.Models; -using JNPF.Common.Security; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.Order; -using JNPF.Extend.Entitys.Model; -using JNPF.LinqBuilder; -using JNPF.Systems.Entitys.Permission; -using JNPF.Systems.Interfaces.Permission; -using JNPF.WorkFlow.Entitys.Entity; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using Yitter.IdGenerator; - -namespace JNPF.Extend; - -/// -/// 订单管理 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "CrmOrder", Order = 200)] -[Route("api/extend/[controller]")] -public class OrderService : IDynamicApiController, ITransient -{ - private readonly ISqlSugarRepository _repository; - private readonly IUsersService _usersService; - private readonly ICacheManager _cacheManager; - private readonly IFileManager _fileManager; - private readonly IUserManager _userManager; // 用户管理 - - public OrderService( - ISqlSugarRepository repository, - IUserManager userManager, - IUsersService usersService, - ICacheManager cacheManager) - { - _repository = repository; - _userManager = userManager; - _usersService = usersService; - _cacheManager = cacheManager; - } - - #region GET - - /// - /// 列表. - /// - /// 请求参数 - /// - [HttpGet("")] - public async Task GetList([FromQuery] OrderListQuery input) - { - var queryWhere = LinqExpression.And(); - var authorizeWhere = new List(); - - // 关键字(订单编码、客户名称、业务人员) - if (input.keyword.IsNotEmptyOrNull()) - queryWhere = queryWhere.And(m => m.orderCode.Contains(input.keyword) || m.customerName.Contains(input.keyword) || m.salesmanName.Contains(input.keyword)); - - // 起始日期-结束日期 - if (input.endTime != null && input.startTime != null) - { - var start = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 00:00:00}", input.startTime?.TimeStampToDateTime())); - var end = Convert.ToDateTime(string.Format("{0:yyyy-MM-dd 23:59:59}", input.endTime?.TimeStampToDateTime())); - queryWhere = queryWhere.And(x => SqlFunc.Between(x.orderDate, start, end)); - } - - // 数据权限过滤 - if (_userManager.User.IsAdministrator == 0) - authorizeWhere = await _userManager.GetConditionAsync("F4FCA43A-B563-4149-AB16-486589CFC154", "F_ID", true, "a."); - var pageList = await _repository.AsSugarClient().Queryable((a, b, c) => new JoinQueryInfos(JoinType.Left, a.CreatorUserId == b.Id, JoinType.Left, a.Id == c.Id)) - .Where((a, b) => a.DeleteMark == null).Where(authorizeWhere) - .Select((a, b, c) => new OrderListOutput() - { - creatorUser = SqlFunc.MergeString(b.RealName, "/", b.Account), - creatorUserId = a.CreatorUserId, - currentState = c.Status, - customerName = a.CustomerName, - description = a.Description, - id = a.Id, - orderCode = a.OrderCode, - orderDate = a.OrderDate, - receivableMoney = a.ReceivableMoney, - salesmanName = a.SalesmanName, - creatorTime = a.CreatorTime, - sortCode = a.SortCode, - lastModifyTime = a.LastModifyTime - }).MergeTable().Where(queryWhere) - .OrderBy(a => a.sortCode) - .OrderBy(a => a.creatorTime, OrderByType.Desc) - .OrderByIF(!string.IsNullOrEmpty(input.keyword), t => t.lastModifyTime, OrderByType.Desc) - .ToPagedListAsync(input.currentPage, input.pageSize); - return PageResult.SqlSugarPageResult(pageList); - } - - /// - /// 子列表(订单明细). - /// - /// 主表Id. - /// - [HttpGet("OrderEntry/{id}/Items")] - public async Task GetEntryList(string id) - { - var data = await _repository.AsSugarClient().Queryable().Where(x => x.OrderId == id).OrderBy(x => x.SortCode).ToListAsync(); - var output = data.Adapt>(); - return new { list = output }; - } - - /// - /// 子列表(订单收款). - /// - /// 主表Id. - /// - [HttpGet("{id}/CollectionPlan")] - public async Task GetReceivableList(string id) - { - var data = await _repository.AsSugarClient().Queryable().Where(x => x.OrderId == id).OrderBy(o => o.SortCode).ToListAsync(); - var output = data.Adapt>(); - return new { list = output }; - } - - /// - /// 信息. - /// - /// 主键值. - /// - [HttpGet("{id}")] - public async Task GetInfo(string id) - { - if ("0".Equals(id)) return null; - var data = (await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null)).Adapt(); - if (data.IsNullOrEmpty()) return null; - data.collectionPlanList = (await _repository.AsSugarClient().Queryable().Where(x => x.OrderId == id).ToListAsync()).Adapt>(); - data.goodsList = (await _repository.AsSugarClient().Queryable().Where(x => x.OrderId == id).ToListAsync()).Adapt>(); - data.creatorUserId = await _usersService.GetUserName(data.creatorUserId); - data.lastModifyUserId = await _usersService.GetUserName(data.lastModifyUserId); - return data; - } - - /// - /// 客户列表. - /// - /// 关键字. - /// - [HttpGet("Customer")] - public dynamic GetCustomerList(string keyword) - { - var json = "[{\"id\":\"8094826d-dfe0-4a05-9023-4d441c304c61\",\"text\":\"广东雪莱特光电科技股份有限公司\",\"code\":\"100000\",\"keyword\":\"GDXLTGDKJGFYXGS,ADXLTGDKJGFYXGS\"},{\"id\":\"b20e965b-9f18-4228-9532-e506caf751e3\",\"text\":\"广州旭之日电子科技有限公司\",\"code\":\"100001\",\"keyword\":\"GZXZRDZKJYXGS,AZXZRDZKJYXGS\"},{\"id\":\"563326c0-ad5f-4221-9ff7-dbf687c4b802\",\"text\":\"东莞市博力威汽车配件有限公司\",\"code\":\"100002\",\"keyword\":\"DWSBLWQJPJYXGS,DWSBLWQCPJYXGS,DGSBLWQJPJYXGS,DGSBLWQCPJYXGS\"},{\"id\":\"b28691a9-acdc-4fdd-9e5f-c2fd04e5a795\",\"text\":\"佛山市恒威汽车动力转向器公司\",\"code\":\"100003\",\"keyword\":\"BSSHWQJDLZXQGS,BSSHWQCDLZXQGS\"},{\"id\":\"37143c66-93a0-4ec2-8625-5dc3f0059e5c\",\"text\":\"广州三锦照明电器公司\",\"code\":\"100004\",\"keyword\":\"GZSJZMDQGS,AZSJZMDQGS\"},{\"id\":\"712a390f-deb7-4d6d-b1bf-cb93b2221306\",\"text\":\"广州鑫正源汽配有限公司\",\"code\":\"100005\",\"keyword\":\"GZXZYQPYXGS,AZXZYQPYXGS\"},{\"id\":\"a10fa05a-7954-4500-a3e9-2b42837a6ee9\",\"text\":\"广州市德霸照明电器有限公司\",\"code\":\"100006\",\"keyword\":\"GZSDBZMDQYXGS,AZSDBZMDQYXGS\"},{\"id\":\"cb715ab8-8940-480a-b1f2-cc61b73ae44b\",\"text\":\"深圳星际服饰有限公司\",\"code\":\"100007\",\"keyword\":\"SZXJFSYXGS\"},{\"id\":\"6c265977-5480-4e3e-82a3-0f71f750f109\",\"text\":\"深圳市博锐纵横科技有限公司\",\"code\":\"100008\",\"keyword\":\"SZSBRZHKJYXGS\"},{\"id\":\"2bbc5699-1968-42d0-b950-39df42b6718f\",\"text\":\"广州融星商贸有限公司\",\"code\":\"100009\",\"keyword\":\"GZRXSMYXGS,AZRXSMYXGS\"},{\"id\":\"64e597d4-0a8e-4bf7-b8d7-64ca8a2e6c20\",\"text\":\"广州顶诚科技电子有限公司\",\"code\":\"100010\",\"keyword\":\"GZDCKJDZYXGS,AZDCKJDZYXGS\"},{\"id\":\"15337f7e-3fff-4403-96b9-eaebbef85534\",\"text\":\"烟台孚瑞克森汽车部件有限公司\",\"code\":\"100011\",\"keyword\":\"YTFRKSQJBJYXGS,YTFRKSQCBJYXGS\"},{\"id\":\"46746ff8-c48b-43c7-a9e9-51a19d1d2499\",\"text\":\"茌平信发铝电集团有限公司\",\"code\":\"100012\",\"keyword\":\"CPXFLDJTYXGS\"},{\"id\":\"6f752d0c-b416-4552-8ef9-5f2136e77689\",\"text\":\"济南澳商贸易有限公司\",\"code\":\"100013\",\"keyword\":\"JNASMYYXGS\"},{\"id\":\"8ab80843-e007-4dd4-8d39-d28f05ba1643\",\"text\":\"济南澳润商贸有限公司\",\"code\":\"100014\",\"keyword\":\"JNARSMYXGS\"},{\"id\":\"2d10551d-6f72-4c00-abd4-8c9856a2aeba\",\"text\":\"山东凯诺汽车配件有限公司\",\"code\":\"100015\",\"keyword\":\"SDKNQJPJYXGS,SDKNQCPJYXGS\"},{\"id\":\"30d89988-00f5-4abc-88ea-592f058c8d89\",\"text\":\"烟台瑞福汽车部件有限公司\",\"code\":\"100016\",\"keyword\":\"YTRFQJBJYXGS,YTRFQCBJYXGS\"},{\"id\":\"812ccd19-f7d5-4c24-9e11-b31bfee50d41\",\"text\":\"茌平日兴达汽车部件有限公司\",\"code\":\"100017\",\"keyword\":\"CPRXDQJBJYXGS,CPRXDQCBJYXGS\"},{\"id\":\"89f05f5f-5ca2-4f59-a41a-abc3a444a77c\",\"text\":\"永正汽车配件有限责任公司\",\"code\":\"100018\",\"keyword\":\"YZQJPJYXZRGS,YZQCPJYXZRGS\"},{\"id\":\"5be62e54-c3cf-4927-a8fc-61e6d6534e24\",\"text\":\"青岛华安正信国际贸易有限公司\",\"code\":\"100019\",\"keyword\":\"QDHAZXGJMYYXGS\"},{\"id\":\"45e990c7-ffc2-4df8-8b83-2af4d4b07fbb\",\"text\":\"广饶中策橡胶有限公司\",\"code\":\"100020\",\"keyword\":\"GRZCXJYXGS,ARZCXJYXGS\"},{\"id\":\"c865c9fb-135e-40b8-bb38-9a909f5c3a8b\",\"text\":\"山东张驰橡胶有限公司\",\"code\":\"100021\",\"keyword\":\"SDZCXJYXGS\"},{\"id\":\"802c13c6-a89c-4351-98a6-956f48fd3c72\",\"text\":\"济南易久自动化有限公司\",\"code\":\"100022\",\"keyword\":\"JNYJZDHYXGS\"},{\"id\":\"49ddaa6c-ba14-48af-9782-4c780914cd30\",\"text\":\"山东汇丰汽车配件有限公司\",\"code\":\"100023\",\"keyword\":\"SDHFQJPJYXGS,SDHFQCPJYXGS\"},{\"id\":\"179ac5c2-6ea3-4b7e-994f-0e6d846394d6\",\"text\":\"烟台浩阳机械制造有限公司\",\"code\":\"100024\",\"keyword\":\"YTHYJXZZYXGS\"},{\"id\":\"2a8d22e0-97a5-49e4-8929-f850d4e207c4\",\"text\":\"山东跃恒轮胎化工有限公司\",\"code\":\"100025\",\"keyword\":\"SDYHLTHGYXGS\"},{\"id\":\"8ade7cd2-59f0-435d-a5ed-6e5c47566dab\",\"text\":\"东营博瑞制动系统有限公司\",\"code\":\"100026\",\"keyword\":\"DYBRZDXTYXGS,DYBRZDJTYXGS\"},{\"id\":\"37b52c55-85c1-4a8a-acb7-217231d21404\",\"text\":\"泰安玥欣工贸有限公司\",\"code\":\"100027\",\"keyword\":\"TAYXGMYXGS\"},{\"id\":\"145b9423-bcda-45c9-ab9c-ecda841a5f97\",\"text\":\"山东世途轮胎有限公司\",\"code\":\"100028\",\"keyword\":\"SDSTLTYXGS\"},{\"id\":\"53e40ffa-b566-4280-bac0-70839df36ae9\",\"text\":\"山东世通轮胎有限公司\",\"code\":\"100029\",\"keyword\":\"SDSTLTYXGS\"},{\"id\":\"aabc07b9-a067-4a6d-8979-8bacf09b6601\",\"text\":\"龙口海盟机械有限公司\",\"code\":\"100030\",\"keyword\":\"LKHMJXYXGS\"},{\"id\":\"b01061f5-fc4b-4a6c-8c9d-e74bbc6d65f0\",\"text\":\"枣庄市正邦新型建材有限公司\",\"code\":\"100031\",\"keyword\":\"ZZSZBXXJCYXGS\"},{\"id\":\"0f6dc939-632f-4318-9887-831aadf2f016\",\"text\":\"济南宏岺汽车配件公司\",\"code\":\"100032\",\"keyword\":\"JNHLQJPJGS,JNHLQCPJGS\"},{\"id\":\"44134ad0-84ca-47e5-bdb2-a90701d3b526\",\"text\":\"山东富华汽车配件公司\",\"code\":\"100033\",\"keyword\":\"SDFHQJPJGS,SDFHQCPJGS\"},{\"id\":\"123b6bac-7638-457b-a920-83cc0fa0c2dc\",\"text\":\"聊城贝尔汽车散热器有限公司\",\"code\":\"100034\",\"keyword\":\"LCBEQJSRQYXGS,LCBEQCSRQYXGS\"},{\"id\":\"7b3ee427-6785-4a55-a6e2-8b92c3c756ec\",\"text\":\"枣庄市正邦新型建材有限公司\",\"code\":\"100035\",\"keyword\":\"ZZSZBXXJCYXGS\"},{\"id\":\"abef7a36-c1aa-4324-893e-5ee0cf12ba06\",\"text\":\"山东军泰化工有限公司\",\"code\":\"100036\",\"keyword\":\"SDJTHGYXGS\"},{\"id\":\"579f7530-c82d-4eea-b98d-7ac27db0d92c\",\"text\":\"山东鑫月昶汽车配件有限公司\",\"code\":\"100037\",\"keyword\":\"SDXYCQJPJYXGS,SDXYCQCPJYXGS\"},{\"id\":\"12e0e23d-170d-4924-8088-915796555737\",\"text\":\"山东宏马工程机械有限公司\",\"code\":\"100038\",\"keyword\":\"SDHMGCJXYXGS\"},{\"id\":\"047a68cb-2a57-47f0-ab04-5781147a8888\",\"text\":\"青岛祥荣轮胎有限公司\",\"code\":\"100039\",\"keyword\":\"QDXRLTYXGS\"},{\"id\":\"61129e0d-1b4c-4947-b78b-6ac80de557ca\",\"text\":\"斯伯塔克轮胎集团有限公司\",\"code\":\"100040\",\"keyword\":\"SBTKLTJTYXGS,SBDKLTJTYXGS\"},{\"id\":\"87676528-a2c6-46fc-922f-3854ac7b1e3b\",\"text\":\"东营信义汇丰汽车配件有限公司\",\"code\":\"100041\",\"keyword\":\"DYXYHFQJPJYXGS,DYXYHFQCPJYXGS\"},{\"id\":\"63105380-d09b-4506-baa3-6212d8ac95f2\",\"text\":\"青岛征和工业有限公司\",\"code\":\"100042\",\"keyword\":\"QDZHGYYXGS\"},{\"id\":\"1aecaf71-6623-4992-9f7e-fee68efe61a0\",\"text\":\"上海卓美实业有限公司\",\"code\":\"100043\",\"keyword\":\"SHZMSYYXGS\"},{\"id\":\"61fd0246-fd9c-4fe2-a648-7fe745d2b013\",\"text\":\"上海塞蓝帝国际贸易有限公司\",\"code\":\"100044\",\"keyword\":\"SHSLDGJMYYXGS\"},{\"id\":\"8e26ceca-41d6-42d0-bcc9-500768437d4a\",\"text\":\"上海繁颐国际贸易有限公司\",\"code\":\"100045\",\"keyword\":\"SHPYGJMYYXGS,SHFYGJMYYXGS\"},{\"id\":\"9dd3ed1e-ff4b-4317-b1da-b64fd07e6157\",\"text\":\"六安龙啸工艺品有限公司\",\"code\":\"100046\",\"keyword\":\"LALXGYPYXGS\"},{\"id\":\"f1890c89-fb6c-4736-897d-7dc9c905d7f3\",\"text\":\"六安江澎电器商行\",\"code\":\"100047\",\"keyword\":\"LAJPDQSX,LAJPDQSH\"},{\"id\":\"ffbbe328-488b-4873-bfe3-fbe597716a9b\",\"text\":\"安徽法西欧汽车部件有限公司\",\"code\":\"100048\",\"keyword\":\"AHFXOQJBJYXGS,AHFXOQCBJYXGS\"},{\"id\":\"ff620a66-c80b-4b63-b4bd-ef54d488d67d\",\"text\":\"安徽奥丰汽车配件有限公司\",\"code\":\"100049\",\"keyword\":\"AHAFQJPJYXGS,AHAFQCPJYXGS\"},{\"id\":\"13855122-d6b9-40b1-8415-803ea06ff294\",\"text\":\"瑞安市给力汽车配件有限公司\",\"code\":\"100050\",\"keyword\":\"RASGLQJPJYXGS,RASGLQCPJYXGS,RASJLQJPJYXGS,RASJLQCPJYXGS\"},{\"id\":\"5e9f61c4-f95e-4b12-a462-13310a64fef4\",\"text\":\"温州名邦汽车用品有限公司\",\"code\":\"100051\",\"keyword\":\"WZMBQJYPYXGS,WZMBQCYPYXGS\"},{\"id\":\"34d4627c-5e0b-4e67-936a-da8740743430\",\"text\":\"温州拉凡宝汽车泵业有限公司\",\"code\":\"100052\",\"keyword\":\"WZLFBQJBYYXGS,WZLFBQCBYYXGS\"},{\"id\":\"5c496717-738f-45bc-a613-7a6d6086da9c\",\"text\":\"瑞安科普进出口贸易有限公司\",\"code\":\"100053\",\"keyword\":\"RAKPJCKMYYXGS\"},{\"id\":\"3552401c-90f7-4197-91b6-b8735732884e\",\"text\":\"瑞安中申电器有限公司\",\"code\":\"100054\",\"keyword\":\"RAZSDQYXGS\"},{\"id\":\"2656a62a-52b9-4749-8fa9-ffbf8dc5c940\",\"text\":\"温州金品汽车用品有限公司\",\"code\":\"100055\",\"keyword\":\"WZJPQJYPYXGS,WZJPQCYPYXGS\"},{\"id\":\"a7cd833f-e49e-4496-a29c-215c4ef623be\",\"text\":\"瑞安市力邦科众制动器有限公司\",\"code\":\"100056\",\"keyword\":\"RASLBKZZDQYXGS\"},{\"id\":\"133b902b-12c4-4a00-b238-73a71ae24540\",\"text\":\"宁波广良电器有限公司\",\"code\":\"100057\",\"keyword\":\"NBGLDQYXGS,NBALDQYXGS\"},{\"id\":\"13a19f6b-3d0f-4f17-92f6-8bd3df4ac3d5\",\"text\":\"温州杰峰进出口有限公司\",\"code\":\"100058\",\"keyword\":\"WZJFJCKYXGS\"},{\"id\":\"4a88166a-8b55-40d7-bb22-04dbb1883d34\",\"text\":\"温州科达汽车轴瓦有限公司\",\"code\":\"100059\",\"keyword\":\"WZKDQJZWYXGS,WZKDQCZWYXGS\"},{\"id\":\"22c92533-57af-427c-9b3b-7644dc0a86ef\",\"text\":\"宁波钧乔行汽车配件有限公司\",\"code\":\"100060\",\"keyword\":\"NBJQXQJPJYXGS,NBJQXQCPJYXGS,NBJQHQJPJYXGS,NBJQHQCPJYXGS\"},{\"id\":\"45715bdd-1740-4a30-82c8-d9ef3d05cc5a\",\"text\":\"浙江平柴泵业有限公司\",\"code\":\"100061\",\"keyword\":\"ZJPCBYYXGS\"},{\"id\":\"6a5d46f3-20e4-4a27-b097-3ba6beef7981\",\"text\":\"宁波鑫海爱多雨刷制造有限公司\",\"code\":\"100062\",\"keyword\":\"NBXHADYSZZYXGS\"},{\"id\":\"faadbe66-142b-4d52-8229-0b5239ff0d76\",\"text\":\"浙江亚之星汽车部件有限公司\",\"code\":\"100063\",\"keyword\":\"ZJYZXQJBJYXGS,ZJYZXQCBJYXGS\"},{\"id\":\"f8ed65af-ad33-435d-9f99-d63f04c4a6d0\",\"text\":\"浙江立群汽车配件制造有限公司\",\"code\":\"100064\",\"keyword\":\"ZJLQQJPJZZYXGS,ZJLQQCPJZZYXGS\"},{\"id\":\"46a50622-a4a5-46aa-b307-ca530e77b918\",\"text\":\"浙江林氏汽车零部件有限公司\",\"code\":\"100065\",\"keyword\":\"ZJLZQJLBJYXGS,ZJLZQCLBJYXGS,ZJLSQJLBJYXGS,ZJLSQCLBJYXGS\"},{\"id\":\"6dd6c16c-7a50-4a9b-8e3f-4d5e87091046\",\"text\":\"浙江瑞峰汽车零部件有限公司\",\"code\":\"100066\",\"keyword\":\"ZJRFQJLBJYXGS,ZJRFQCLBJYXGS\"},{\"id\":\"9bfbc91f-2e12-4fca-a6f5-55bf0b21f453\",\"text\":\"温州万豪汽配有限公司\",\"code\":\"100067\",\"keyword\":\"WZWHQPYXGS,WZMHQPYXGS\"},{\"id\":\"c86726b0-345d-479b-99d0-f26ab525b690\",\"text\":\"浙江兰德马克汽车配件有限公司\",\"code\":\"100068\",\"keyword\":\"ZJLDMKQJPJYXGS,ZJLDMKQCPJYXGS\"},{\"id\":\"a7af2dc9-4e11-4452-a897-33b696131de4\",\"text\":\"浙江乐鼎波纹管有限公司\",\"code\":\"100069\",\"keyword\":\"ZJYDBWGYXGS,ZJLDBWGYXGS\"},{\"id\":\"46f82e53-ef5b-4b59-bc0e-7a98d4951784\",\"text\":\"浙江奥凯利汽配有限公司\",\"code\":\"100070\",\"keyword\":\"ZJAKLQPYXGS\"},{\"id\":\"03b372b7-adc9-41c1-8db2-db6da049f0b4\",\"text\":\"宁波昂博电器科技有限公司\",\"code\":\"100071\",\"keyword\":\"NBABDQKJYXGS\"},{\"id\":\"069bb158-2719-40e8-9f3e-ea8d14774a98\",\"text\":\"浙江吉尚汽车部件有限公司\",\"code\":\"100072\",\"keyword\":\"ZJJSQJBJYXGS,ZJJSQCBJYXGS\"},{\"id\":\"4caaf81a-925f-471d-b4a6-a330b5e5835b\",\"text\":\"诸暨市国立机械有限公司\",\"code\":\"100073\",\"keyword\":\"ZJSGLJXYXGS\"},{\"id\":\"a24b6a50-1b17-413e-828b-4107410b2a2e\",\"text\":\"玉环冠丰汽车零部件有限公司\",\"code\":\"100074\",\"keyword\":\"YHGFQJLBJYXGS,YHGFQCLBJYXGS\"},{\"id\":\"cabfe7d7-c164-4444-bff0-b547d5a3b9db\",\"text\":\"武义万龙机械制造有限公司\",\"code\":\"100075\",\"keyword\":\"WYWLJXZZYXGS,WYMLJXZZYXGS\"},{\"id\":\"67142c93-f97c-401c-8079-7ebb8159e838\",\"text\":\"浙江安泰汽车部件有限公司\",\"code\":\"100076\",\"keyword\":\"ZJATQJBJYXGS,ZJATQCBJYXGS\"},{\"id\":\"05b20523-ca83-4072-8ea0-84ea3623e436\",\"text\":\"余姚斯威克电器有限公司\",\"code\":\"100077\",\"keyword\":\"YYSWKDQYXGS\"},{\"id\":\"7baa025e-56b7-48a1-bcd2-0f3c1128016e\",\"text\":\"温州鼎程电子科技有限公司\",\"code\":\"100078\",\"keyword\":\"WZDCDZKJYXGS\"},{\"id\":\"f57b707c-f7fe-4c29-b6e3-a4cc607e11f0\",\"text\":\"临海裕隆汽配有限公司\",\"code\":\"100079\",\"keyword\":\"LHYLQPYXGS\"},{\"id\":\"d07308e7-9139-43f2-8e07-bcd69e74a0e1\",\"text\":\"宁波路卡帝电器有限公司\",\"code\":\"100080\",\"keyword\":\"NBLQDDQYXGS,NBLKDDQYXGS\"},{\"id\":\"512eb341-29e5-49fb-8d61-ba4dcc63245e\",\"text\":\"宁波雷自达电器有限公司\",\"code\":\"100081\",\"keyword\":\"NBLZDDQYXGS\"},{\"id\":\"781c1504-487c-4a7c-bf14-cb47d14a646e\",\"text\":\"温州凯特汽车用品制造厂\",\"code\":\"100082\",\"keyword\":\"WZKTQJYPZZC,WZKTQJYPZZA,WZKTQCYPZZC,WZKTQCYPZZA\"},{\"id\":\"01d7eaa2-0d4e-4e16-985b-45afac5d0538\",\"text\":\"宁波博盛汽车电子有限公司\",\"code\":\"100083\",\"keyword\":\"NBBSQJDZYXGS,NBBSQCDZYXGS,NBBCQJDZYXGS,NBBCQCDZYXGS\"},{\"id\":\"41a31860-be6b-4014-a936-72a221779de6\",\"text\":\"温州欧泰汽车用品制造有限公司\",\"code\":\"100084\",\"keyword\":\"WZOTQJYPZZYXGS,WZOTQCYPZZYXGS\"},{\"id\":\"06ccc046-131b-4691-9341-359f7ae5063e\",\"text\":\"永康市蓝特工贸有限公司\",\"code\":\"100085\",\"keyword\":\"YKSLTGMYXGS\"},{\"id\":\"e46a07e6-0936-4e7a-81cc-9c4ddbd03184\",\"text\":\"宁波行泰商贸有限公司\",\"code\":\"100086\",\"keyword\":\"NBXTSMYXGS,NBHTSMYXGS\"},{\"id\":\"48a9c7ce-d6df-4a44-8d0e-3c88ad3cc54d\",\"text\":\"瑞安市路泰汽摩零部件有限公司\",\"code\":\"100087\",\"keyword\":\"RASLTQMLBJYXGS\"},{\"id\":\"19aaab61-5281-4ac7-b5f4-edc520c89653\",\"text\":\"瑞安宏盛汽配厂\",\"code\":\"100088\",\"keyword\":\"RAHSQPC,RAHSQPA,RAHCQPC,RAHCQPA\"},{\"id\":\"04d60fed-56ec-4418-abe4-1a25929fb7b0\",\"text\":\"诸暨市维琪弹簧有限公司\",\"code\":\"100089\",\"keyword\":\"ZJSWQTHYXGS,ZJSWQDHYXGS\"},{\"id\":\"d6f5eec0-aa1a-4017-ac41-05470d3924a4\",\"text\":\"杭州康功轴承有限公司\",\"code\":\"100090\",\"keyword\":\"HZKGZCYXGS\"},{\"id\":\"4c33ee68-a64a-4454-ae3a-e62a2fe74d25\",\"text\":\"余姚航亿电器有限公司\",\"code\":\"100091\",\"keyword\":\"YYHYDQYXGS\"},{\"id\":\"a039923a-bb38-43f7-9d07-f252b139d9ef\",\"text\":\"浙江天元机电有限公司\",\"code\":\"100092\",\"keyword\":\"ZJTYJDYXGS\"},{\"id\":\"0617174b-b904-496a-a179-027504ef3699\",\"text\":\"瑞安市剑达汽车配件有限公司\",\"code\":\"100093\",\"keyword\":\"RASJDQJPJYXGS,RASJDQCPJYXGS\"},{\"id\":\"82364f9a-f9d8-4451-896b-85a2bcbe6902\",\"text\":\"台州华帅汽配有限公司\",\"code\":\"100094\",\"keyword\":\"TZHSQPYXGS\"},{\"id\":\"568872cb-66b8-43fc-a64d-3554186f0c4b\",\"text\":\"浙江铭泰汽车零部件有限公司\",\"code\":\"100095\",\"keyword\":\"ZJMTQJLBJYXGS,ZJMTQCLBJYXGS\"},{\"id\":\"8111675d-7449-4445-b0a1-14602f14ab77\",\"text\":\"浙江戈尔德汽车部件有限公司\",\"code\":\"100096\",\"keyword\":\"ZJGEDQJBJYXGS,ZJGEDQCBJYXGS\"},{\"id\":\"3a6a3be8-4b72-42eb-a872-f3395c81ca1d\",\"text\":\"常州国华电器有限公司\",\"code\":\"100097\",\"keyword\":\"CZGHDQYXGS\"},{\"id\":\"73f61385-1674-4dda-ac8e-950a886c5410\",\"text\":\"瑞安兴润贸易有限公司\",\"code\":\"100098\",\"keyword\":\"RAXRMYYXGS\"},{\"id\":\"1ee6531c-725f-4f44-b37d-8ad787c4922c\",\"text\":\"绍兴明博汽车配件有限公司\",\"code\":\"100099\",\"keyword\":\"SXMBQJPJYXGS,SXMBQCPJYXGS\"},{\"id\":\"6ff18edc-b10e-4349-8f3f-ca68f1eceee8\",\"text\":\"温州良子贸易有限公司\",\"code\":\"100100\",\"keyword\":\"WZLZMYYXGS\"},{\"id\":\"f87234e3-7199-4262-be6a-1a8f77524efc\",\"text\":\"宁波力富特牵引机制造有限公司\",\"code\":\"100101\",\"keyword\":\"NBLFTQYJZZYXGS\"},{\"id\":\"799826d9-6f8b-42a0-a713-37b9739b68df\",\"text\":\"宁波市江北名正电机有限公司\",\"code\":\"100102\",\"keyword\":\"NBSJBMZDJYXGS\"},{\"id\":\"84a17072-2047-477a-9b24-67e98f5d2220\",\"text\":\"宁波茂佳国际贸易有限公司\",\"code\":\"100103\",\"keyword\":\"NBMJGJMYYXGS\"},{\"id\":\"224ba569-fdc5-4705-b4e8-d30bcd36b854\",\"text\":\"瑞安市墉下文峰汽摩配厂\",\"code\":\"100104\",\"keyword\":\"RASYXWFQMPC,RASYXWFQMPA\"},{\"id\":\"e8bd46cd-db81-4c5e-b083-d1c05a0034a6\",\"text\":\"诸暨宇诺汽车配件有限公司\",\"code\":\"100105\",\"keyword\":\"ZJYNQJPJYXGS,ZJYNQCPJYXGS\"},{\"id\":\"781dd8cf-711a-4afa-9e22-f5a0a333637e\",\"text\":\"宁波泰和轴承有限公司\",\"code\":\"100106\",\"keyword\":\"NBTHZCYXGS\"},{\"id\":\"9bbc9c86-290b-4687-8a98-449a1a415266\",\"text\":\"东海县兰天汽车车轮厂\",\"code\":\"100107\",\"keyword\":\"DHXLTQJJLC,DHXLTQJJLA,DHXLTQJCLC,DHXLTQJCLA,DHXLTQCJLC,DHXLTQCJLA,DHXLTQCCLC,DHXLTQCCLA\"},{\"id\":\"679c136c-21c9-4ac3-ad7a-db0a613ca24d\",\"text\":\"扬州阿波罗蓄电池有限公司\",\"code\":\"100108\",\"keyword\":\"YZABLXDCYXGS,YZEBLXDCYXGS\"},{\"id\":\"3dd2eb0f-0097-4b52-9165-78e2a8d474e1\",\"text\":\"常州中隆车辆配件有限公司\",\"code\":\"100109\",\"keyword\":\"CZZLJLPJYXGS,CZZLCLPJYXGS\"},{\"id\":\"760becc2-0253-4f81-879f-970f432620d9\",\"text\":\"无锡吉瑞特机械制造有限公司\",\"code\":\"100110\",\"keyword\":\"WXJRTJXZZYXGS,MXJRTJXZZYXGS\"},{\"id\":\"b8bd4d12-2f85-43e8-b891-94866a18e90f\",\"text\":\"金坛市平江电气设备有限公司\",\"code\":\"100111\",\"keyword\":\"JTSPJDQSBYXGS\"},{\"id\":\"df0c341e-03ca-4900-95ae-fbad4e11cf9b\",\"text\":\"江苏精诚动力工程有限公司\",\"code\":\"100112\",\"keyword\":\"JSJCDLGCYXGS\"},{\"id\":\"348a509b-5f69-457e-9e9c-d28a03b2f13e\",\"text\":\"南京卡安汽车配件有限公司\",\"code\":\"100113\",\"keyword\":\"NJQAQJPJYXGS,NJQAQCPJYXGS,NJKAQJPJYXGS,NJKAQCPJYXGS\"},{\"id\":\"e69574d5-b276-4828-b2c0-c1fa7ae5b4b0\",\"text\":\"丹阳市帅达车业有限公司\",\"code\":\"100114\",\"keyword\":\"DYSSDJYYXGS,DYSSDCYYXGS\"},{\"id\":\"0fbec45d-4064-4a89-9c1e-34476d0f9e1d\",\"text\":\"江苏丹阳市超强汽配有限公司\",\"code\":\"100115\",\"keyword\":\"JSDYSCQQPYXGS,JSDYSCJQPYXGS\"},{\"id\":\"f1e15fa6-d4df-45db-9143-89e5bfd89f72\",\"text\":\"常州云昊汽车用品有限公司\",\"code\":\"100116\",\"keyword\":\"CZYHQJYPYXGS,CZYHQCYPYXGS\"},{\"id\":\"85c9d273-68ef-4dc4-8760-a2c303ab7953\",\"text\":\"常州南舜汽车附件厂\",\"code\":\"100117\",\"keyword\":\"CZNSQJFJC,CZNSQJFJA,CZNSQCFJC,CZNSQCFJA\"},{\"id\":\"7f7a474b-8327-40be-9ef2-711ebd53defc\",\"text\":\"常州顺德车业有限公司\",\"code\":\"100118\",\"keyword\":\"CZSDJYYXGS,CZSDCYYXGS\"},{\"id\":\"90fbf581-6eb9-421a-8105-73a396ac1003\",\"text\":\"常州昊翔车辆饰件有限公司\",\"code\":\"100119\",\"keyword\":\"CZHXJLSJYXGS,CZHXCLSJYXGS\"},{\"id\":\"723358eb-6b04-4fb3-876e-65f374666aa3\",\"text\":\"常州乐丰汽车饰件厂\",\"code\":\"100120\",\"keyword\":\"CZYFQJSJC,CZYFQJSJA,CZYFQCSJC,CZYFQCSJA,CZLFQJSJC,CZLFQJSJA,CZLFQCSJC,CZLFQCSJA\"},{\"id\":\"26823b21-030a-44c1-9d6a-84da4d288057\",\"text\":\"丹阳文明塑业有限公司\",\"code\":\"100121\",\"keyword\":\"DYWMSYYXGS\"},{\"id\":\"8f3c1330-d743-43d7-8f13-6b8b78f03f68\",\"text\":\"南京润特科技有限公司\",\"code\":\"100122\",\"keyword\":\"NJRTKJYXGS\"},{\"id\":\"89693dd1-50d8-4bc6-98c6-773e8220df26\",\"text\":\"重庆子堃进出口贸易有限公司\",\"code\":\"100123\",\"keyword\":\"ZQZKJCKMYYXGS,CQZKJCKMYYXGS\"},{\"id\":\"ac55602f-4526-4c09-b36b-3b0b5e5af107\",\"text\":\"石家庄旺正国际贸易有限公司\",\"code\":\"100124\",\"keyword\":\"SJZWZGJMYYXGS,DJZWZGJMYYXGS\"},{\"id\":\"930e0f13-cdf9-4149-8e79-8a9f18282f65\",\"text\":\"河间津华金属缺口有限公司\",\"code\":\"100125\",\"keyword\":\"HJJHJZQKYXGS,HJJHJSQKYXGS\"},{\"id\":\"0b4d11ab-b31a-4883-af56-037a54566ce4\",\"text\":\"河北蓝博汽车部件制造有限公司\",\"code\":\"100126\",\"keyword\":\"HBLBQJBJZZYXGS,HBLBQCBJZZYXGS\"},{\"id\":\"abe09ea0-ea41-4063-91b3-ae231f0b6724\",\"text\":\"献县亚特汽车附件厂\",\"code\":\"100127\",\"keyword\":\"XXYTQJFJC,XXYTQJFJA,XXYTQCFJC,XXYTQCFJA\"},{\"id\":\"ae0a1cc0-6ddf-45b8-82d0-51d6b34ad630\",\"text\":\"河北兴浦汽车制动器有限公司\",\"code\":\"100128\",\"keyword\":\"HBXPQJZDQYXGS,HBXPQCZDQYXGS\"},{\"id\":\"aa9ddf53-e4b8-4e36-8063-6f215e9b9407\",\"text\":\"邢台市龙洋机械制造有限公司\",\"code\":\"100129\",\"keyword\":\"XTSLYJXZZYXGS\"},{\"id\":\"3de2ed7f-8155-40b5-9bb3-b30313712040\",\"text\":\"湖北楚欣汽车销售公司\",\"code\":\"100130\",\"keyword\":\"HBCXQJXSGS,HBCXQCXSGS\"},{\"id\":\"a9ae4dfa-330f-4d1c-b420-d3ba0ee0b6b6\",\"text\":\"湘潭迅东机电科技有限公司\",\"code\":\"100131\",\"keyword\":\"XTXDJDKJYXGS\"},{\"id\":\"e0c48427-33e0-443e-9b03-3c2042d9e249\",\"text\":\"福州瑞利贸易有限公司\",\"code\":\"100132\",\"keyword\":\"FZRLMYYXGS\"},{\"id\":\"25386c99-9abc-432d-b632-efa796796827\",\"text\":\"厦门市鑫美汽车配件有限公司\",\"code\":\"100133\",\"keyword\":\"XMSXMQJPJYXGS,XMSXMQCPJYXGS,SMSXMQJPJYXGS,SMSXMQCPJYXGS\"},{\"id\":\"f94add9c-2910-439a-af5f-0d0174f75ce8\",\"text\":\"北京纳天科技有限公司\",\"code\":\"100134\",\"keyword\":\"BJNTKJYXGS\"},{\"id\":\"8a89e1bf-9389-40ba-8da1-e09376e2a046\",\"text\":\"北京瑞博汽车零部件有限公司\",\"code\":\"100135\",\"keyword\":\"BJRBQJLBJYXGS,BJRBQCLBJYXGS\"},{\"id\":\"75837bc2-6959-46f3-b1bb-5a66022b21ca\",\"text\":\"天津鑫正拓达轴承贸易有限公司\",\"code\":\"100136\",\"keyword\":\"TJXZTDZCMYYXGS\"},{\"id\":\"8e442488-2c8b-4e03-88ce-13ed5845889f\",\"text\":\"中铝国际工程公司\",\"code\":\"100137\",\"keyword\":\"ZLGJGCGS\"},{\"id\":\"be2a1881-89f4-48be-9c26-25fe0359924d\",\"text\":\"中国瑞林工程技术有限公司\",\"code\":\"100138\",\"keyword\":\"ZGRLGCJZYXGS,ZGRLGCJSYXGS\"},{\"id\":\"36fa9f7e-3281-4725-b284-ddf0a2e65bde\",\"text\":\"山东省冶金设计院\",\"code\":\"100139\",\"keyword\":\"SDSYJSJY,SDXYJSJY\"},{\"id\":\"53fed6f4-b67c-451a-a1a0-b0ed986ce519\",\"text\":\"中国核电工程有限公司\",\"code\":\"100140\",\"keyword\":\"ZGHDGCYXGS\"},{\"id\":\"b40ba0e8-dfe9-431d-9da3-73629037f385\",\"text\":\"中国水电顾问集团华东勘测设计院\",\"code\":\"100141\",\"keyword\":\"ZGSDGWJTHDKCSJY\"},{\"id\":\"8fe4d0e0-9b2a-46c8-9a6b-1a1b01d48c4c\",\"text\":\"中国电力顾问集团西北电力设计院\",\"code\":\"100142\",\"keyword\":\"ZGDLGWJTXBDLSJY\"},{\"id\":\"7f8cc56b-47c0-4afe-98a2-2a7956a8ca4f\",\"text\":\"中国电力顾问集团东北电力设计院\",\"code\":\"100143\",\"keyword\":\"ZGDLGWJTDBDLSJY\"},{\"id\":\"a0cac21c-2f3e-4ae0-9895-b03bc196fe3a\",\"text\":\"中国电力顾问集团西南电力设计院\",\"code\":\"100144\",\"keyword\":\"ZGDLGWJTXNDLSJY\"},{\"id\":\"c4a5b6de-caf8-47b9-98fb-ca2f914d59fe\",\"text\":\"中国电力顾问集团华东电力设计院\",\"code\":\"100145\",\"keyword\":\"ZGDLGWJTHDDLSJY\"},{\"id\":\"b617604d-7dc6-48c6-b982-e0601bf0f720\",\"text\":\"现代设计集团上海建筑设计院\",\"code\":\"100146\",\"keyword\":\"XDSJJTSHJZSJY\"},{\"id\":\"d4ec8f1b-099b-46a9-8e55-961ab8c308db\",\"text\":\"现代设计集团上海都市设计院\",\"code\":\"100147\",\"keyword\":\"XDSJJTSHDSSJY\"},{\"id\":\"c3d8769e-ccaf-4675-8e1f-349199a3ac33\",\"text\":\"山东同圆设计集团\",\"code\":\"100148\",\"keyword\":\"SDTYSJJT\"},{\"id\":\"028e4fbf-5b08-4554-8fa0-9c555db9ed9e\",\"text\":\"广西华蓝设计集团\",\"code\":\"100149\",\"keyword\":\"GXHLSJJT,AXHLSJJT\"},{\"id\":\"b42b46a3-26fa-47b7-94e2-12909f6c7bf0\",\"text\":\"济南人防建筑设计院\",\"code\":\"100150\",\"keyword\":\"JNRFJZSJY\"},{\"id\":\"36815670-af42-4756-ae30-b1b1b29e2036\",\"text\":\"北京市园林古建设计院\",\"code\":\"100151\",\"keyword\":\"BJSYLGJSJY\"},{\"id\":\"c029e27a-9741-4a10-a630-459be9b3ed90\",\"text\":\"中铁城市规划设计院\",\"code\":\"100152\",\"keyword\":\"ZTCSGHSJY\"},{\"id\":\"e137e6a7-5a80-4a85-8505-f5dac87902d3\",\"text\":\"四川国恒建筑设计有限公司\",\"code\":\"100153\",\"keyword\":\"SCGHJZSJYXGS\"},{\"id\":\"e03bc67b-5caf-4b2d-9b76-7a2c092d3e5d\",\"text\":\"北京三磊建筑设计有限公司\",\"code\":\"100154\",\"keyword\":\"BJSLJZSJYXGS\"},{\"id\":\"78162e75-475f-4540-a87f-4af3e9ac62c0\",\"text\":\"大连市建筑设计研究院有限公司\",\"code\":\"100155\",\"keyword\":\"DLSJZSJYJYYXGS\"},{\"id\":\"d4b3e726-9f8a-42f2-a4e2-8a2ec73ea065\",\"text\":\"安徽省电力设计院\",\"code\":\"100156\",\"keyword\":\"AHSDLSJY,AHXDLSJY\"},{\"id\":\"3c6e4d26-d665-4466-b315-3f7aceda7cf1\",\"text\":\"贵州省交通规划勘察设计研究院股份有限公司\",\"code\":\"100157\",\"keyword\":\"GZSJTGHKCSJYJYGFYXGS,GZXJTGHKCSJYJYGFYXGS\"},{\"id\":\"39778e60-e443-4787-b6c1-e07763725def\",\"text\":\"中交路桥技术有限公司\",\"code\":\"100158\",\"keyword\":\"ZJLQJZYXGS,ZJLQJSYXGS\"},{\"id\":\"5b238085-2c0a-48dc-b82e-09fe1f808575\",\"text\":\"河海大学设计院\",\"code\":\"100159\",\"keyword\":\"HHDXSJY\"},{\"id\":\"6b2e3047-3127-4620-94f2-0c887fc37831\",\"text\":\"重庆市水利电力建筑勘测设计研究院\",\"code\":\"100160\",\"keyword\":\"ZQSSLDLJZKCSJYJY,CQSSLDLJZKCSJYJY\"},{\"id\":\"014065ac-2ebb-465c-ad6e-415ff534d47f\",\"text\":\"神华宁煤能源工程公司\",\"code\":\"100161\",\"keyword\":\"SHNMNYGCGS\"},{\"id\":\"027123ad-94d5-4788-9fbf-138e9472bb0b\",\"text\":\"江西省天驰高速科技发展有限公司\",\"code\":\"100162\",\"keyword\":\"JXSTCGSKJFZYXGS,JXXTCGSKJFZYXGS\"},{\"id\":\"2571e2b5-1c4e-44e4-a700-18828fdc3f50\",\"text\":\"陕西省公路勘察设计研究院\",\"code\":\"100163\",\"keyword\":\"SXSGLKCSJYJY,SXXGLKCSJYJY\"},{\"id\":\"0dcfdd5b-2c0a-4272-93e6-e5d2b4989da6\",\"text\":\"大连市市政设计研究院有限公司\",\"code\":\"100164\",\"keyword\":\"DLSSZSJYJYYXGS\"},{\"id\":\"cd112ba0-abe0-46b6-b8e3-b2bdde2b028d\",\"text\":\"济南市政设计院集团有限公司\",\"code\":\"100165\",\"keyword\":\"JNSZSJYJTYXGS\"},{\"id\":\"5b734763-2085-4fd0-ba4e-16c08c3db4f9\",\"text\":\"天津华淼工程设计有限公司\",\"code\":\"100166\",\"keyword\":\"TJHMGCSJYXGS\"},{\"id\":\"5f3dd251-3df4-4b15-8be6-7171d99589a9\",\"text\":\"福州城建设计院\",\"code\":\"100167\",\"keyword\":\"FZCJSJY\"},{\"id\":\"070d83fa-65fd-4bde-a58a-1abff0dc3fd1\",\"text\":\"上海浦东新区规划设计院\",\"code\":\"100168\",\"keyword\":\"SHPDXQGHSJY,SHPDXOGHSJY\"},{\"id\":\"ea0ce956-24b3-4286-83be-f3cf9d12927b\",\"text\":\"厦门市政设计院有限公司\",\"code\":\"100169\",\"keyword\":\"XMSZSJYYXGS,SMSZSJYYXGS\"},{\"id\":\"7811d748-fa8e-4624-aa42-089c479872ea\",\"text\":\"长春城乡规划设计研究院\",\"code\":\"100170\",\"keyword\":\"ZCCXGHSJYJY,CCCXGHSJYJY\"},{\"id\":\"3a33c63f-4cda-4a78-b2a0-f5f64c9c2e6b\",\"text\":\"太原理工大学建筑设计研究院\",\"code\":\"100171\",\"keyword\":\"TYLGDXJZSJYJY\"},{\"id\":\"b25a5046-f6eb-4d6c-9cf4-28f8b15efa50\",\"text\":\"云南省交通规划设计院\",\"code\":\"100172\",\"keyword\":\"YNSJTGHSJY,YNXJTGHSJY\"},{\"id\":\"3999746f-8a66-4878-ab60-56ebdc7b7e4d\",\"text\":\"新疆石油勘察设计研究院(有限公司)\",\"code\":\"100173\",\"keyword\":\"XJSYKCSJYJYYXGS,XJDYKCSJYJYYXGS\"},{\"id\":\"910efec6-d547-43e8-8ed3-432893dba5a9\",\"text\":\"天津电力设计院\",\"code\":\"100174\",\"keyword\":\"TJDLSJY\"},{\"id\":\"193b480f-2e20-4af4-96d4-42368f3ad500\",\"text\":\"中国联合工程公司\",\"code\":\"100175\",\"keyword\":\"ZGLHGCGS,ZGLGGCGS\"},{\"id\":\"01f2cf7c-8eeb-4373-9c1d-f4755262ea00\",\"text\":\"机械第一设计研究院\",\"code\":\"100176\",\"keyword\":\"JXDYSJYJY\"},{\"id\":\"dde2ceae-8f99-4a15-92af-15b83dff4d6c\",\"text\":\"中交公路规划设计院\",\"code\":\"100177\",\"keyword\":\"ZJGLGHSJY\"},{\"id\":\"6ce05827-8237-4ede-9d1f-b2bd997e5f4e\",\"text\":\"中交第一公路设计院\",\"code\":\"100178\",\"keyword\":\"ZJDYGLSJY\"},{\"id\":\"05dcec72-d731-4c32-87f8-077783c9e5c9\",\"text\":\"中交水运规划设计院\",\"code\":\"100179\",\"keyword\":\"ZJSYGHSJY\"},{\"id\":\"0eb8ed9f-33e3-499c-b1af-88770a394733\",\"text\":\"中交第一航务工程勘察设计院\",\"code\":\"100180\",\"keyword\":\"ZJDYHWGCKCSJY\"},{\"id\":\"de9eb0f8-4bf3-4e83-b34f-58d280f82a54\",\"text\":\"江苏省交通规划设计院\",\"code\":\"100181\",\"keyword\":\"JSSJTGHSJY,JSXJTGHSJY\"},{\"id\":\"42976dad-b069-415e-9b82-eb82687a0337\",\"text\":\"中铁第四勘察设计院\",\"code\":\"100182\",\"keyword\":\"ZTDSKCSJY\"},{\"id\":\"f69a0aa8-eacd-4c0e-80e9-2a86b810c2e7\",\"text\":\"中煤西安设计工程公司\",\"code\":\"100183\",\"keyword\":\"ZMXASJGCGS\"},{\"id\":\"c86e5f6e-e520-479b-aeab-9d8ccf6df582\",\"text\":\"煤炭工业济南设计院\",\"code\":\"100184\",\"keyword\":\"MTGYJNSJY\"},{\"id\":\"389f6b7c-d9e6-40cf-bcde-441a59d4e39f\",\"text\":\"长江勘测规划设计研究院\",\"code\":\"100185\",\"keyword\":\"ZJKCGHSJYJY,CJKCGHSJYJY\"},{\"id\":\"347c8975-6572-48af-9853-93f13b719e0c\",\"text\":\"浙江省水利电力勘测设计院\",\"code\":\"100186\",\"keyword\":\"ZJSSLDLKCSJY,ZJXSLDLKCSJY\"},{\"id\":\"e1e1d8f9-230c-4eaf-86fd-34f044182147\",\"text\":\"中石化胜利油田设计院\",\"code\":\"100187\",\"keyword\":\"ZSHSLYTSJY,ZDHSLYTSJY\"},{\"id\":\"565f7b52-5b3c-423d-ba27-2b8db5bb1bc0\",\"text\":\"浙江天正工程设计公司\",\"code\":\"100188\",\"keyword\":\"ZJTZGCSJGS\"},{\"id\":\"6328e535-035f-4b86-ad1e-975d2c7bd71d\",\"text\":\"中国市政西北设计院\",\"code\":\"100189\",\"keyword\":\"ZGSZXBSJY\"},{\"id\":\"c5ea1162-19df-496b-b5a5-f7b793e6236c\",\"text\":\"中国医药联合工程公司\",\"code\":\"100190\",\"keyword\":\"ZGYYLHGCGS,ZGYYLGGCGS\"},{\"id\":\"fdc00925-0259-4b52-9580-14d9f7a974a6\",\"text\":\"上海杰作设计有限公司(方案公司)\",\"code\":\"100191\",\"keyword\":\"SHJZSJYXGSFAGS\"},{\"id\":\"9e73316c-6d78-4fa6-a468-9718b102aee2\",\"text\":\"哈尔滨市城市规划设计院\",\"code\":\"100192\",\"keyword\":\"HEBSCSGHSJY\"},{\"id\":\"77085a8a-7ed6-4838-9669-9c2f925f8c1d\",\"text\":\"北京玉龙石化工程有限公司\",\"code\":\"100193\",\"keyword\":\"BJYLSHGCYXGS,BJYLDHGCYXGS\"},{\"id\":\"8c3c4f29-b6b3-4381-acf3-5dfe82e4d626\",\"text\":\"长岭炼化岳阳工程设计有限公司\",\"code\":\"100194\",\"keyword\":\"ZLLHYYGCSJYXGS,CLLHYYGCSJYXGS\"},{\"id\":\"f16b42f9-62c7-4c0c-bde6-70ae9f40ca34\",\"text\":\"沈阳测绘勘测设计研究院\",\"code\":\"100195\",\"keyword\":\"SYCHKCSJYJY,CYCHKCSJYJY\"},{\"id\":\"bb615453-1bc4-44e0-afa0-6e93b28f7c82\",\"text\":\"合肥勘察测绘设计院\",\"code\":\"100196\",\"keyword\":\"HFKCCHSJY,GFKCCHSJY\"},{\"id\":\"39ff5412-5966-4a6e-9e87-433ee28dd4bb\",\"text\":\"贵阳铝镁设计院\",\"code\":\"100197\",\"keyword\":\"GYLMSJY\"},{\"id\":\"0dd735fe-2839-4363-a17d-f3282f1895c4\",\"text\":\"中国船舶及海洋工程设计研究院\",\"code\":\"100198\",\"keyword\":\"ZGCBJHYGCSJYJY\"},{\"id\":\"14808a17-cb67-4443-be92-2ece27501797\",\"text\":\"青岛市人防建筑设计研究院\",\"code\":\"100199\",\"keyword\":\"QDSRFJZSJYJY\"},{\"id\":\"41dd4bee-cd7d-413b-bbe4-55cba9e88aa6\",\"text\":\"中国舰船研究设计中心701研究所\",\"code\":\"100200\",\"keyword\":\"ZGJCYJSJZXYJS\"},{\"id\":\"14935fff-d00f-4dfb-97c6-bda5e6a38a9d\",\"text\":\"中国有色金属长沙勘察设计研究院\",\"code\":\"100201\",\"keyword\":\"ZGYSJZZSKCSJYJY,ZGYSJZCSKCSJYJY,ZGYSJSZSKCSJYJY,ZGYSJSCSKCSJYJY\"},{\"id\":\"39d07d25-3d56-4029-b0e6-32ce913e51a7\",\"text\":\"昆明诚信勘察设计院\",\"code\":\"100202\",\"keyword\":\"KMCXKCSJY\"},{\"id\":\"96e6e579-fb95-4b36-9345-28e6e8ff9821\",\"text\":\"中冶建研设计院环保事业部\",\"code\":\"100203\",\"keyword\":\"ZYJYSJYHBSYB\"},{\"id\":\"e89d7d36-985f-4cba-9e19-d0976b15be95\",\"text\":\"福建省建筑设计研究院\",\"code\":\"100204\",\"keyword\":\"FJSJZSJYJY,FJXJZSJYJY\"},{\"id\":\"452efea8-13b8-43c2-8ef4-7a263184f766\",\"text\":\"四川海辰工程设计院有限公司\",\"code\":\"100205\",\"keyword\":\"SCHCGCSJYYXGS\"},{\"id\":\"0e27510e-e430-4f75-a058-cd0dfa15672c\",\"text\":\"中冶建筑设计研究总院\",\"code\":\"100206\",\"keyword\":\"ZYJZSJYJZY\"},{\"id\":\"1fb79091-4f4d-44ee-9cfa-3bf5d9945407\",\"text\":\"中南建筑设计院股份有限公司 \",\"code\":\"100207\",\"keyword\":\"ZNJZSJYGFYXGS\"},{\"id\":\"af2fb3c8-c51f-4cb2-b2d0-367d52308e11\",\"text\":\"云南怡成建筑设计公司\",\"code\":\"100208\",\"keyword\":\"YNYCJZSJGS\"},{\"id\":\"7962e095-0e8b-4c2d-9df2-6998d53d9337\",\"text\":\"浙江华坤建筑设计院有限公司\",\"code\":\"100209\",\"keyword\":\"ZJHKJZSJYYXGS\"},{\"id\":\"c61406ed-0fd5-4df5-bf3b-8d0fca20e726\",\"text\":\"唐山铭嘉建筑设计咨询有限公司\",\"code\":\"100210\",\"keyword\":\"TSMJJZSJZXYXGS\"},{\"id\":\"aa207db4-6530-4ede-9599-61464967888b\",\"text\":\"河南省电力勘测设计院\",\"code\":\"100211\",\"keyword\":\"HNSDLKCSJY,HNXDLKCSJY\"},{\"id\":\"1209412d-95bb-4c40-845d-28ba5634ffdd\",\"text\":\"河北省电力勘测设计院\",\"code\":\"100212\",\"keyword\":\"HBSDLKCSJY,HBXDLKCSJY\"}]"; - var data = json.ToObject(); - if (!string.IsNullOrEmpty(keyword)) - { - data = GetDataFilter(data, "code like '%" + keyword + "%' or text like '%" + keyword + "%' or keyword like '%" + keyword + "%'"); - } - return new { list = GetSelectTop(data, 10) }; - } - - /// - /// 商品列表. - /// - /// 关键字. - /// - [HttpGet("Goods")] - public dynamic GetGoodsList(string keyword) - { - var json = "[{\"id\":\"692110120107\",\"code\":\"106423\",\"text\":\"蜡笔小新棒棒冰\",\"specifications\":\"85g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"ZBXXBBB,LBXXBBB\"},{\"id\":\"692364427858\",\"code\":\"974498\",\"text\":\"蒙牛纯甄酸牛奶原味\",\"specifications\":\"200g\",\"unit\":\"盒\",\"price\":\"4.46\",\"keyword\":\"MNCZSNNYW\"},{\"id\":\"690799251257\",\"code\":\"416821\",\"text\":\"伊利安慕希希腊酸奶\",\"specifications\":\"205g\",\"unit\":\"包\",\"price\":\"4.46\",\"keyword\":\"YLAMXXXSN,YLAMXXLSN\"},{\"id\":\"690102819104\",\"code\":\"524868\",\"text\":\"白沙精品香烟\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"7.29\",\"keyword\":\"BSJPXY\"},{\"id\":\"690040452111\",\"code\":\"828691\",\"text\":\"天友新鲜杯大红枣酸奶\",\"specifications\":\"160g\",\"unit\":\"杯\",\"price\":\"2.43\",\"keyword\":\"TYXXBDHZSN,TYXXBDGZSN\"},{\"id\":\"692364422345\",\"code\":\"107961\",\"text\":\"蒙牛纯牛奶\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"2.27\",\"keyword\":\"MNCNN\"},{\"id\":\"690102819349\",\"code\":\"532214\",\"text\":\"芙蓉王翻盖香烟\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"19.44\",\"keyword\":\"FRWFGXY\"},{\"id\":\"690799210027\",\"code\":\"111311\",\"text\":\"伊利纯牛奶\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"2.35\",\"keyword\":\"YLCNN\"},{\"id\":\"692586153106\",\"code\":\"111594\",\"text\":\"旺旺碎冰冰草莓味\",\"specifications\":\"78g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"WWSBBCMW\"},{\"id\":\"690103561369\",\"code\":\"469391\",\"text\":\"青岛清醇啤酒8度\",\"specifications\":\"330ml\",\"unit\":\"厅\",\"price\":\"2.03\",\"keyword\":\"QDQCPJD\"},{\"id\":\"694935220140\",\"code\":\"898237\",\"text\":\"雪花清爽8度听装啤酒\",\"specifications\":\"330ml\",\"unit\":\"厅\",\"price\":\"2.35\",\"keyword\":\"XHQSDTZPJ\"},{\"id\":\"693262090005\",\"code\":\"869640\",\"text\":\"徐七二白凉粉\",\"specifications\":\"50g\",\"unit\":\"盒\",\"price\":\"1.62\",\"keyword\":\"XQEBLF\"},{\"id\":\"693139200639\",\"code\":\"449683\",\"text\":\"蓝舰果味啤酒饮料\",\"specifications\":\"320ml\",\"unit\":\"厅\",\"price\":\"1.62\",\"keyword\":\"LJGWPJYL\"},{\"id\":\"692416071401\",\"code\":\"448472\",\"text\":\"无穷农场盐焗鸡蛋\",\"specifications\":\"30g\",\"unit\":\"盒\",\"price\":\"1.62\",\"keyword\":\"WQNCYJJD,MQNCYJJD\"},{\"id\":\"692586153183\",\"code\":\"111593\",\"text\":\"旺旺碎冰冰乳酸原味\",\"specifications\":\"78g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"WWSBBRSYW\"},{\"id\":\"692586153114\",\"code\":\"111595\",\"text\":\"旺旺碎冰冰葡萄味\",\"specifications\":\"78g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"WWSBBPTW\"},{\"id\":\"693273131006\",\"code\":\"473563\",\"text\":\"北京蓝氏经典菠萝啤\",\"specifications\":\"320ml\",\"unit\":\"厅\",\"price\":\"1.62\",\"keyword\":\"BJLZJDBLP,BJLSJDBLP\"},{\"id\":\"690103520063\",\"code\":\"493758\",\"text\":\"青岛崂山啤酒8度\",\"specifications\":\"330ml\",\"unit\":\"厅\",\"price\":\"1.62\",\"keyword\":\"QDLSPJD\"},{\"id\":\"692116850925\",\"code\":\"111576\",\"text\":\"农夫山泉\",\"specifications\":\"550ml\",\"unit\":\"瓶\",\"price\":\"1.46\",\"keyword\":\"NFSQ\"},{\"id\":\"692586153117\",\"code\":\"111598\",\"text\":\"旺旺碎冰冰菠萝\",\"specifications\":\"78g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"WWSBBBL\"},{\"id\":\"692250782275\",\"code\":\"466655\",\"text\":\"陈克明鸡蛋精制挂面\",\"specifications\":\"750g\",\"unit\":\"包\",\"price\":\"5.27\",\"keyword\":\"CKMJDJZGM\"},{\"id\":\"690102819101\",\"code\":\"107319\",\"text\":\"白沙软包香烟\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"4.05\",\"keyword\":\"BSRBXY\"},{\"id\":\"693686921537\",\"code\":\"465668\",\"text\":\"味芝元卤鸭掌\",\"specifications\":\"32g\",\"unit\":\"包\",\"price\":\"1.62\",\"keyword\":\"WZYLYZ\"},{\"id\":\"692293923162\",\"code\":\"570758\",\"text\":\"旺旺碎碎冰可乐味\",\"specifications\":\"78g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"WWSSBKYW,WWSSBKLW\"},{\"id\":\"690799251205\",\"code\":\"896808\",\"text\":\"伊利果粒优酸乳草莓味\",\"specifications\":\"245ml\",\"unit\":\"盒\",\"price\":\"2.43\",\"keyword\":\"YLGLYSRCMW\"},{\"id\":\"692364426850\",\"code\":\"781761\",\"text\":\"蒙牛真果粒草莓味\",\"specifications\":\"250g\",\"unit\":\"盒\",\"price\":\"2.84\",\"keyword\":\"MNZGLCMW\"},{\"id\":\"690289023413\",\"code\":\"860522\",\"text\":\"双汇香辣热狗肠\",\"specifications\":\"35g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"SHXLRGC\"},{\"id\":\"690289023416\",\"code\":\"860521\",\"text\":\"双汇玉米热狗肠\",\"specifications\":\"40g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"SHYMRGC\"},{\"id\":\"692586153116\",\"code\":\"111597\",\"text\":\"旺旺碎冰冰柑桔味\",\"specifications\":\"78g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"WWSBBGJW\"},{\"id\":\"694896010156\",\"code\":\"866442\",\"text\":\"哈尔滨冰爽啤酒\",\"specifications\":\"330ml\",\"unit\":\"瓶\",\"price\":\"2.27\",\"keyword\":\"HEBBSPJ\"},{\"id\":\"692586153182\",\"code\":\"111592\",\"text\":\"旺旺碎冰冰桃子味\",\"specifications\":\"78g\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"WWSBBTZW\"},{\"id\":\"695476743038\",\"code\":\"898085\",\"text\":\"可口可乐雪碧\",\"specifications\":\"330ml\",\"unit\":\"厅\",\"price\":\"2.03\",\"keyword\":\"KKKYXB,KKKLXB\"},{\"id\":\"690102822742\",\"code\":\"464956\",\"text\":\"龙凤呈祥(新朝天门)\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"8.10\",\"keyword\":\"LFCXXZTM,LFCXXCTM\"},{\"id\":\"695056110013\",\"code\":\"465775\",\"text\":\"迪怩司脆脆冰水蜜桃味\",\"specifications\":\"82ml\",\"unit\":\"支\",\"price\":\"0.81\",\"keyword\":\"DNSCCBSMTW\"},{\"id\":\"690799251355\",\"code\":\"468959\",\"text\":\"伊利安慕希希腊酸奶香草味\",\"specifications\":\"205g\",\"unit\":\"盒\",\"price\":\"4.46\",\"keyword\":\"YLAMXXXSNXCW,YLAMXXLSNXCW\"},{\"id\":\"690128599121\",\"code\":\"807160\",\"text\":\"怡宝饮用纯净水\",\"specifications\":\"555ml\",\"unit\":\"瓶\",\"price\":\"1.46\",\"keyword\":\"YBYYCJS\"},{\"id\":\"690442290629\",\"code\":\"490952\",\"text\":\"科迪原生牛奶\",\"specifications\":\"180ml\",\"unit\":\"包\",\"price\":\"2.43\",\"keyword\":\"KDYSNN\"},{\"id\":\"695476741038\",\"code\":\"898083\",\"text\":\"可口可乐\",\"specifications\":\"330ml\",\"unit\":\"厅\",\"price\":\"2.03\",\"keyword\":\"KKKY,KKKL\"},{\"id\":\"694443701605\",\"code\":\"418138\",\"text\":\"小样乳酸菌乳原味\",\"specifications\":\"4*100ml\",\"unit\":\"板\",\"price\":\"6.48\",\"keyword\":\"XYRSJRYW\"},{\"id\":\"692481080131\",\"code\":\"827499\",\"text\":\"卡士调味鲜酪乳原味\",\"specifications\":\"120g\",\"unit\":\"杯\",\"price\":\"2.84\",\"keyword\":\"QSTWXLRYW,QSDWXLRYW,KSTWXLRYW,KSDWXLRYW\"},{\"id\":\"690152428238\",\"code\":\"532431\",\"text\":\"津威强化锌酸奶\",\"specifications\":\"95ml\",\"unit\":\"板\",\"price\":\"3.65\",\"keyword\":\"JWQHXSN,JWJHXSN\"},{\"id\":\"690799251285\",\"code\":\"438652\",\"text\":\"伊利安慕希蓝莓味金属包\",\"specifications\":\"205g\",\"unit\":\"盒\",\"price\":\"4.70\",\"keyword\":\"YLAMXLMWJZB,YLAMXLMWJSB\"},{\"id\":\"692364428269\",\"code\":\"480106\",\"text\":\"蒙牛纯甄风味酸奶牛奶芝士味\",\"specifications\":\"200g\",\"unit\":\"盒\",\"price\":\"4.86\",\"keyword\":\"MNCZFWSNNNZSW\"},{\"id\":\"690208389864\",\"code\":\"469458\",\"text\":\"娃哈哈桂圆莲子八宝粥\",\"specifications\":\"280g\",\"unit\":\"瓶\",\"price\":\"3.24\",\"keyword\":\"WHHGYLZBBZ,WHHGYLZBBY\"},{\"id\":\"690102807576\",\"code\":\"524873\",\"text\":\"中华翻盖香烟\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"36.45\",\"keyword\":\"ZHFGXY\"},{\"id\":\"692364428357\",\"code\":\"485055\",\"text\":\"蒙牛真果粒蓝莓\",\"specifications\":\"\",\"unit\":\"盒\",\"price\":\"2.84\",\"keyword\":\"MNZGLLM\"},{\"id\":\"692777090182\",\"code\":\"868462\",\"text\":\"山花草莓杯酸\",\"specifications\":\"100g\",\"unit\":\"杯\",\"price\":\"1.62\",\"keyword\":\"SHCMBS\"},{\"id\":\"695606400042\",\"code\":\"458194\",\"text\":\"雪天绿色加碘精制深井矿盐\",\"specifications\":\"400g\",\"unit\":\"盒\",\"price\":\"1.62\",\"keyword\":\"XTLSJDJZSJKY\"},{\"id\":\"692777090069\",\"code\":\"532429\",\"text\":\"山花纯牛奶\",\"specifications\":\"220ml\",\"unit\":\"包\",\"price\":\"2.03\",\"keyword\":\"SHCNN\"},{\"id\":\"690208388108\",\"code\":\"106964\",\"text\":\"娃哈哈AD钙\",\"specifications\":\"220g\",\"unit\":\"排\",\"price\":\"5.67\",\"keyword\":\"WHHG\"},{\"id\":\"692777090181\",\"code\":\"868460\",\"text\":\"山花原味杯酸\",\"specifications\":\"100g\",\"unit\":\"杯\",\"price\":\"1.62\",\"keyword\":\"SHYWBS\"},{\"id\":\"695636733868\",\"code\":\"916213\",\"text\":\"王老吉凉茶\",\"specifications\":\"310ml\",\"unit\":\"灌\",\"price\":\"3.24\",\"keyword\":\"WLJLC\"},{\"id\":\"690152413833\",\"code\":\"871920\",\"text\":\"津威彩装乳酸菌饮品\",\"specifications\":\"100ml\",\"unit\":\"排\",\"price\":\"6.89\",\"keyword\":\"JWCZRSJYP\"},{\"id\":\"692356788010\",\"code\":\"917231\",\"text\":\"咪咪是味条\",\"specifications\":\"20g\",\"unit\":\"包\",\"price\":\"0.41\",\"keyword\":\"MMSWT\"},{\"id\":\"692586153122\",\"code\":\"845220\",\"text\":\"旺旺碎碎冰家庭号\",\"specifications\":\"85ml*8\",\"unit\":\"袋\",\"price\":\"6.48\",\"keyword\":\"WWSSBJTH\"},{\"id\":\"690799251139\",\"code\":\"862009\",\"text\":\"伊利红谷礼盒苗条装\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"2.43\",\"keyword\":\"YLHYLHMTZ,YLHGLHMTZ,YLGYLHMTZ,YLGGLHMTZ\"},{\"id\":\"697046974031\",\"code\":\"491631\",\"text\":\"盐小厨加碘食盐绿袋\",\"specifications\":\"400g\",\"unit\":\"包\",\"price\":\"1.62\",\"keyword\":\"YXCJDSYLD\"},{\"id\":\"694791590801\",\"code\":\"825860\",\"text\":\"小号购物袋\",\"specifications\":\"24*40\",\"unit\":\"个\",\"price\":\"0.16\",\"keyword\":\"XHGWD\"},{\"id\":\"693359561616\",\"code\":\"906227\",\"text\":\"恭兵合装豆干\",\"specifications\":\"25g\",\"unit\":\"包\",\"price\":\"0.81\",\"keyword\":\"GBHZDG,GBGZDG\"},{\"id\":\"692364426851\",\"code\":\"781762\",\"text\":\"蒙牛真果粒黄桃味\",\"specifications\":\"250g\",\"unit\":\"盒\",\"price\":\"2.84\",\"keyword\":\"MNZGLHTW\"},{\"id\":\"695606400043\",\"code\":\"460279\",\"text\":\"雪天海藻碘盐\",\"specifications\":\"320g\",\"unit\":\"包\",\"price\":\"2.03\",\"keyword\":\"XTHZDY\"},{\"id\":\"693686770007\",\"code\":\"446585\",\"text\":\"土豆粉\",\"specifications\":\"\",\"unit\":\"袋\",\"price\":\"2.03\",\"keyword\":\"TDF\"},{\"id\":\"693466508765\",\"code\":\"856955\",\"text\":\"蒙牛优益C活性乳酸菌原味\",\"specifications\":\"340ml\",\"unit\":\"瓶\",\"price\":\"5.27\",\"keyword\":\"MNYYHXRSJYW\"},{\"id\":\"690799210001\",\"code\":\"106924\",\"text\":\"伊利优酸乳草莓味\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"1.62\",\"keyword\":\"YLYSRCMW\"},{\"id\":\"692364424293\",\"code\":\"106906\",\"text\":\"蒙牛酸酸乳草莓味\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"1.46\",\"keyword\":\"MNSSRCMW\"},{\"id\":\"690102819102\",\"code\":\"107278\",\"text\":\"白沙翻盖白沙\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"4.46\",\"keyword\":\"BSFGBS\"},{\"id\":\"694791590802\",\"code\":\"825861\",\"text\":\"中号购物袋\",\"specifications\":\"30*50\",\"unit\":\"个\",\"price\":\"0.16\",\"keyword\":\"ZHGWD\"},{\"id\":\"690102803974\",\"code\":\"860194\",\"text\":\"贵烟(硬黄精品)\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"10.13\",\"keyword\":\"GYYHJP\"},{\"id\":\"693472810060\",\"code\":\"862349\",\"text\":\"福太子石锅剁椒鱼条\",\"specifications\":\"15g\",\"unit\":\"包\",\"price\":\"0.81\",\"keyword\":\"FTZSGDJYT,FTZDGDJYT\"},{\"id\":\"695010380149\",\"code\":\"947876\",\"text\":\"丝美乐青花系列3层软抽\",\"specifications\":\"402张\",\"unit\":\"包\",\"price\":\"3.24\",\"keyword\":\"SMYQHXLCRC,SMYQHJLCRC,SMLQHXLCRC,SMLQHJLCRC\"},{\"id\":\"690799251195\",\"code\":\"896814\",\"text\":\"伊利QQ星营养果汁酸奶草莓味\",\"specifications\":\"200ml\",\"unit\":\"瓶\",\"price\":\"2.43\",\"keyword\":\"YLXYYGZSNCMW\"},{\"id\":\"693472810059\",\"code\":\"862351\",\"text\":\"福太子老坛山椒鱼条\",\"specifications\":\"15g\",\"unit\":\"包\",\"price\":\"0.81\",\"keyword\":\"FTZLTSJYT\"},{\"id\":\"693472810066\",\"code\":\"862353\",\"text\":\"福太子爽辣鱼条\",\"specifications\":\"15g\",\"unit\":\"包\",\"price\":\"0.81\",\"keyword\":\"FTZSLYT\"},{\"id\":\"694021188960\",\"code\":\"927737\",\"text\":\"养乐多\",\"specifications\":\"5*100ml\",\"unit\":\"排\",\"price\":\"10.37\",\"keyword\":\"YYD,YLD\"},{\"id\":\"693466508645\",\"code\":\"864162\",\"text\":\"蒙牛红枣酸牛奶\",\"specifications\":\"8*100g\",\"unit\":\"条\",\"price\":\"13.61\",\"keyword\":\"MNHZSNN,MNGZSNN\"},{\"id\":\"690799250013\",\"code\":\"107205\",\"text\":\"伊利高钙低脂奶\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"2.51\",\"keyword\":\"YLGGDZN\"},{\"id\":\"692364424292\",\"code\":\"106798\",\"text\":\"蒙牛酸酸乳原味\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"1.46\",\"keyword\":\"MNSSRYW\"},{\"id\":\"690102819385\",\"code\":\"524879\",\"text\":\"芙蓉王极品香烟\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"27.54\",\"keyword\":\"FRWJPXY\"},{\"id\":\"693686921522\",\"code\":\"465670\",\"text\":\"味芝元香辣鱼尾\",\"specifications\":\"32g\",\"unit\":\"包\",\"price\":\"1.62\",\"keyword\":\"WZYXLYY,WZYXLYW\"},{\"id\":\"690799250001\",\"code\":\"106870\",\"text\":\"伊利原味优酸乳饮料\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"1.62\",\"keyword\":\"YLYWYSRYL\"},{\"id\":\"693468857834\",\"code\":\"488594\",\"text\":\"家佳食加碘盐\",\"specifications\":\"350g\",\"unit\":\"袋\",\"price\":\"0.81\",\"keyword\":\"JJSJDY\"},{\"id\":\"690799251258\",\"code\":\"970744\",\"text\":\"伊利味可滋香蕉牛奶\",\"specifications\":\"240ml\",\"unit\":\"盒\",\"price\":\"4.05\",\"keyword\":\"YLWKZXQNN,YLWKZXJNN\"},{\"id\":\"692364425048\",\"code\":\"105698\",\"text\":\"蒙牛草莓果粒酸牛奶\",\"specifications\":\"100g\",\"unit\":\"杯\",\"price\":\"1.81\",\"keyword\":\"MNCMGLSNN\"},{\"id\":\"690799251336\",\"code\":\"469128\",\"text\":\"伊利100%畅意乳酸菌饮品原味\",\"specifications\":\"100ml\",\"unit\":\"排\",\"price\":\"6.48\",\"keyword\":\"YLCYRSJYPYW\"},{\"id\":\"692364426411\",\"code\":\"106702\",\"text\":\"蒙牛早餐核桃味牛奶\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"2.27\",\"keyword\":\"MNZCHTWNN\"},{\"id\":\"693686921523\",\"code\":\"465669\",\"text\":\"味芝元香辣鱼排\",\"specifications\":\"32g\",\"unit\":\"包\",\"price\":\"1.62\",\"keyword\":\"WZYXLYP\"},{\"id\":\"690040452354\",\"code\":\"466499\",\"text\":\"天友纸杯经典原味酸牛奶\",\"specifications\":\"160ml\",\"unit\":\"杯\",\"price\":\"3.24\",\"keyword\":\"TYZBJDYWSNN\"},{\"id\":\"692364426595\",\"code\":\"5454\",\"text\":\"蒙牛利乐砖优智成长奶\",\"specifications\":\"125ml\",\"unit\":\"瓶\",\"price\":\"2.03\",\"keyword\":\"MNLYZYZCZN,MNLYZYZCCN,MNLLZYZCZN,MNLLZYZCCN\"},{\"id\":\"694593067884\",\"code\":\"916757\",\"text\":\"泰香米\",\"specifications\":\"10kg\",\"unit\":\"袋\",\"price\":\"40.42\",\"keyword\":\"TXM\"},{\"id\":\"692245680503\",\"code\":\"659499\",\"text\":\"康师傅矿物质水\",\"specifications\":\"550ml\",\"unit\":\"瓶\",\"price\":\"0.81\",\"keyword\":\"KSFKWZS\"},{\"id\":\"692481080221\",\"code\":\"988651\",\"text\":\"卡士原味鲜酪乳\",\"specifications\":\"100g\",\"unit\":\"杯\",\"price\":\"3.56\",\"keyword\":\"QSYWXLR,KSYWXLR\"},{\"id\":\"692648763781\",\"code\":\"411382\",\"text\":\"属我棒山楂卷\",\"specifications\":\"\",\"unit\":\"个\",\"price\":\"1.22\",\"keyword\":\"ZWBSZJ,ZWBSCJ,SWBSZJ,SWBSCJ\"},{\"id\":\"695476747057\",\"code\":\"898096\",\"text\":\"可口可乐冰露饮用水\",\"specifications\":\"550ml\",\"unit\":\"瓶\",\"price\":\"0.41\",\"keyword\":\"KKKYBLYYS,KKKLBLYYS\"},{\"id\":\"690799251217\",\"code\":\"896809\",\"text\":\"伊利优酸乳果粒酸奶芒果味\",\"specifications\":\"245g\",\"unit\":\"盒\",\"price\":\"2.43\",\"keyword\":\"YLYSRGLSNWGW,YLYSRGLSNMGW\"},{\"id\":\"692777090043\",\"code\":\"557926\",\"text\":\"山花利乐砖纯牛奶\",\"specifications\":\"243ml\",\"unit\":\"盒\",\"price\":\"2.35\",\"keyword\":\"SHLYZCNN,SHLLZCNN\"},{\"id\":\"690799210355\",\"code\":\"480157\",\"text\":\"伊利红枣16连杯\",\"specifications\":\"100g*16\",\"unit\":\"条\",\"price\":\"24.14\",\"keyword\":\"YLHZLB,YLGZLB\"},{\"id\":\"690799251045\",\"code\":\"821001\",\"text\":\"伊利儿童全聪型成长奶\",\"specifications\":\"190ml\",\"unit\":\"盒\",\"price\":\"2.92\",\"keyword\":\"YLETQCXCZN,YLETQCXCCN\"},{\"id\":\"690799251321\",\"code\":\"467896\",\"text\":\"伊利QQ儿童风味酸奶\",\"specifications\":\"205g\",\"unit\":\"盒\",\"price\":\"4.46\",\"keyword\":\"YLETFWSN\"},{\"id\":\"690102819692\",\"code\":\"740635\",\"text\":\"白沙和天下烟\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"81.00\",\"keyword\":\"BSHTXY\"},{\"id\":\"692180470079\",\"code\":\"761202\",\"text\":\"陶华碧老干妈风味辣子鸡\",\"specifications\":\"280g\",\"unit\":\"瓶\",\"price\":\"7.21\",\"keyword\":\"YHBLGMFWLZJ,THBLGMFWLZJ\"},{\"id\":\"692364426849\",\"code\":\"781760\",\"text\":\"蒙牛真果粒芦荟味\",\"specifications\":\"250g\",\"unit\":\"盒\",\"price\":\"2.84\",\"keyword\":\"MNZGLLHW\"},{\"id\":\"692777090184\",\"code\":\"868464\",\"text\":\"山花菠萝杯酸\",\"specifications\":\"100g\",\"unit\":\"杯\",\"price\":\"1.62\",\"keyword\":\"SHBLBS\"},{\"id\":\"693466509111\",\"code\":\"471536\",\"text\":\"蒙牛风味酸牛奶原味\",\"specifications\":\"1*8*100g\",\"unit\":\"条\",\"price\":\"10.45\",\"keyword\":\"MNFWSNNYW\"},{\"id\":\"692180470064\",\"code\":\"526219\",\"text\":\"陶华碧老干妈香辣菜\",\"specifications\":\"80g\",\"unit\":\"包\",\"price\":\"1.54\",\"keyword\":\"YHBLGMXLC,THBLGMXLC\"},{\"id\":\"690799251293\",\"code\":\"439194\",\"text\":\"伊利谷粒多颗粒燕麦牛奶\",\"specifications\":\"200ml\",\"unit\":\"瓶\",\"price\":\"3.24\",\"keyword\":\"YLYLDKLYMNN,YLGLDKLYMNN\"},{\"id\":\"489159933839\",\"code\":\"840384\",\"text\":\"加多宝凉茶\",\"specifications\":\"310ml\",\"unit\":\"厅\",\"price\":\"2.84\",\"keyword\":\"JDBLC\"},{\"id\":\"695084919153\",\"code\":\"496658\",\"text\":\"竹纯量贩家庭装10包装\",\"specifications\":\"10包装\",\"unit\":\"提\",\"price\":\"7.21\",\"keyword\":\"ZCLFJTZBZ\"},{\"id\":\"692020288888\",\"code\":\"107087\",\"text\":\"红牛\",\"specifications\":\"250ml\",\"unit\":\"厅\",\"price\":\"4.78\",\"keyword\":\"HN,GN\"},{\"id\":\"692364426848\",\"code\":\"781758\",\"text\":\"蒙牛真果粒椰果味\",\"specifications\":\"250g\",\"unit\":\"盒\",\"price\":\"2.84\",\"keyword\":\"MNZGLYGW\"},{\"id\":\"692226644473\",\"code\":\"871631\",\"text\":\"清风无芯长卷纸\",\"specifications\":\"160g\",\"unit\":\"提\",\"price\":\"16.93\",\"keyword\":\"QFWXZJZ,QFWXCJZ,QFMXZJZ,QFMXCJZ\"},{\"id\":\"690128599124\",\"code\":\"819864\",\"text\":\"怡宝纯净水\",\"specifications\":\"350ml\",\"unit\":\"瓶\",\"price\":\"1.22\",\"keyword\":\"YBCJS\"},{\"id\":\"692364424074\",\"code\":\"105679\",\"text\":\"蒙牛黄桃杯酸奶\",\"specifications\":\"100g\",\"unit\":\"杯\",\"price\":\"1.81\",\"keyword\":\"MNHTBSN\"},{\"id\":\"695476744148\",\"code\":\"898084\",\"text\":\"可口可乐芬达\",\"specifications\":\"330ml\",\"unit\":\"厅\",\"price\":\"2.03\",\"keyword\":\"KKKYFD,KKKLFD\"},{\"id\":\"692257770418\",\"code\":\"868833\",\"text\":\"君乐宝老酸奶\",\"specifications\":\"139g\",\"unit\":\"杯\",\"price\":\"3.97\",\"keyword\":\"JYBLSN,JLBLSN\"},{\"id\":\"693686921560\",\"code\":\"484363\",\"text\":\"味芝元香辣鸭腿\",\"specifications\":\"38g\",\"unit\":\"袋\",\"price\":\"1.62\",\"keyword\":\"WZYXLYT\"},{\"id\":\"692180470075\",\"code\":\"702596\",\"text\":\"陶华碧老干妈风味豆豉\",\"specifications\":\"280g\",\"unit\":\"瓶\",\"price\":\"6.40\",\"keyword\":\"YHBLGMFWDC,THBLGMFWDC\"},{\"id\":\"692250780650\",\"code\":\"836475\",\"text\":\"陈克明鸡蛋面\",\"specifications\":\"150g\",\"unit\":\"包\",\"price\":\"1.22\",\"keyword\":\"CKMJDM\"},{\"id\":\"694898891870\",\"code\":\"492632\",\"text\":\"喜步佳男式凉拖鞋\",\"specifications\":\"1870\",\"unit\":\"双\",\"price\":\"6.40\",\"keyword\":\"XBJNSLTX\"},{\"id\":\"690102804688\",\"code\":\"532395\",\"text\":\"云烟紫红云烟\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"8.10\",\"keyword\":\"YYZHYY,YYZGYY\"},{\"id\":\"693153490038\",\"code\":\"482836\",\"text\":\"深井盐\",\"specifications\":\"500g\",\"unit\":\"袋\",\"price\":\"1.22\",\"keyword\":\"SJY\"},{\"id\":\"694898891869\",\"code\":\"492631\",\"text\":\"喜步佳女式凉拖鞋\",\"specifications\":\"1869\",\"unit\":\"双\",\"price\":\"6.40\",\"keyword\":\"XBJNSLTX\"},{\"id\":\"690324437095\",\"code\":\"105155\",\"text\":\"七度空间少女装超薄日用\",\"specifications\":\"10片\",\"unit\":\"包\",\"price\":\"6.89\",\"keyword\":\"QDKJSNZCBRY\"},{\"id\":\"690847100470\",\"code\":\"930487\",\"text\":\"养元精研型六个核桃\",\"specifications\":\"240ml\",\"unit\":\"瓶\",\"price\":\"3.24\",\"keyword\":\"YYJYXLGHT\"},{\"id\":\"694791590803\",\"code\":\"825862\",\"text\":\"大号购物袋\",\"specifications\":\"38*60\",\"unit\":\"个\",\"price\":\"0.41\",\"keyword\":\"DHGWD\"},{\"id\":\"692777090183\",\"code\":\"868465\",\"text\":\"山花芦荟杯酸\",\"specifications\":\"100g\",\"unit\":\"杯\",\"price\":\"1.62\",\"keyword\":\"SHLHBS\"},{\"id\":\"695311906083\",\"code\":\"471893\",\"text\":\"雪花金威优选易拉罐\",\"specifications\":\"330ml\",\"unit\":\"罐\",\"price\":\"2.35\",\"keyword\":\"XHJWYXYLG\"},{\"id\":\"691198802529\",\"code\":\"494075\",\"text\":\"达利园豆本豆利乐包原味豆奶\",\"specifications\":\"250ml\",\"unit\":\"袋\",\"price\":\"2.84\",\"keyword\":\"DLYDBDLYBYWDN,DLYDBDLLBYWDN\"},{\"id\":\"695606400059\",\"code\":\"484289\",\"text\":\"雪天精制加碘深井矿盐\",\"specifications\":\"500g\",\"unit\":\"包\",\"price\":\"1.62\",\"keyword\":\"XTJZJDSJKY\"},{\"id\":\"690102807577\",\"code\":\"524934\",\"text\":\"中华软包香烟\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"52.65\",\"keyword\":\"ZHRBXY\"},{\"id\":\"692647520207\",\"code\":\"111617\",\"text\":\"喜之郎原味辣味美好时光海苔\",\"specifications\":\"4.5g\",\"unit\":\"袋\",\"price\":\"3.97\",\"keyword\":\"XZLYWLWMHSGHT\"},{\"id\":\"692231840011\",\"code\":\"806347\",\"text\":\"华辉白凉粉\",\"specifications\":\"50g\",\"unit\":\"盒\",\"price\":\"1.62\",\"keyword\":\"HHBLF\"},{\"id\":\"690040452163\",\"code\":\"860710\",\"text\":\"天友经典老酸奶\",\"specifications\":\"160g\",\"unit\":\"袋\",\"price\":\"4.05\",\"keyword\":\"TYJDLSN\"},{\"id\":\"690324498125\",\"code\":\"118302\",\"text\":\"心相印双层压花餐巾纸\",\"specifications\":\"50张\",\"unit\":\"包\",\"price\":\"1.62\",\"keyword\":\"XXYSCYHCJZ\"},{\"id\":\"695515040031\",\"code\":\"434146\",\"text\":\"圣牧全程有机酸奶\",\"specifications\":\"205g\",\"unit\":\"瓶\",\"price\":\"5.35\",\"keyword\":\"SMQCYJSN\"},{\"id\":\"690799250037\",\"code\":\"107986\",\"text\":\"伊利高钙奶\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"2.51\",\"keyword\":\"YLGGN\"},{\"id\":\"690799251196\",\"code\":\"896815\",\"text\":\"伊利QQ星营养果汁酸奶香蕉味\",\"specifications\":\"200ml\",\"unit\":\"瓶\",\"price\":\"2.43\",\"keyword\":\"YLXYYGZSNXQW,YLXYYGZSNXJW\"},{\"id\":\"692213010110\",\"code\":\"106608\",\"text\":\"太太乐鸡精\",\"specifications\":\"40g\",\"unit\":\"袋\",\"price\":\"1.78\",\"keyword\":\"TTYJJ,TTLJJ\"},{\"id\":\"693427299207\",\"code\":\"469726\",\"text\":\"维邦竹琨卷纸\",\"specifications\":\"1800g\",\"unit\":\"提\",\"price\":\"25.84\",\"keyword\":\"WBZKJZ\"},{\"id\":\"692364424031\",\"code\":\"1072\",\"text\":\"蒙牛高钙低脂奶\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"2.59\",\"keyword\":\"MNGGDZN\"},{\"id\":\"690799251043\",\"code\":\"821003\",\"text\":\"伊利儿童健固型成长奶\",\"specifications\":\"190ml\",\"unit\":\"盒\",\"price\":\"2.92\",\"keyword\":\"YLETJGXCZN,YLETJGXCCN\"},{\"id\":\"694673506009\",\"code\":\"448873\",\"text\":\"华雄荔枝爽\",\"specifications\":\"240g\",\"unit\":\"厅\",\"price\":\"1.62\",\"keyword\":\"HXLZS\"},{\"id\":\"690799210391\",\"code\":\"480147\",\"text\":\"伊利原味发酵乳8连杯特惠装\",\"specifications\":\"8*100g\",\"unit\":\"条\",\"price\":\"10.37\",\"keyword\":\"YLYWFJRLBTHZ\"},{\"id\":\"690289023418\",\"code\":\"862032\",\"text\":\"双汇台式烤肠\",\"specifications\":\"48g\",\"unit\":\"支\",\"price\":\"1.62\",\"keyword\":\"SHTSKC\"},{\"id\":\"692364427215\",\"code\":\"825088\",\"text\":\"蒙牛早餐奶红枣味\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"2.27\",\"keyword\":\"MNZCNHZW,MNZCNGZW\"},{\"id\":\"690040452283\",\"code\":\"934348\",\"text\":\"天友低乳糖酸牛奶\",\"specifications\":\"160g\",\"unit\":\"杯\",\"price\":\"3.24\",\"keyword\":\"TYDRTSNN\"},{\"id\":\"692530758886\",\"code\":\"495342\",\"text\":\"网袋白蒜\",\"specifications\":\"\",\"unit\":\"袋\",\"price\":\"2.43\",\"keyword\":\"WDBS\"},{\"id\":\"691001901115\",\"code\":\"873329\",\"text\":\"雕牌洗衣皂\",\"specifications\":\"2*202g\",\"unit\":\"组\",\"price\":\"5.27\",\"keyword\":\"DPXYZ\"},{\"id\":\"692224181017\",\"code\":\"489962\",\"text\":\"一起旺冰冰家庭号\",\"specifications\":\"78ml*8\",\"unit\":\"包\",\"price\":\"5.59\",\"keyword\":\"YQWBBJTH\"},{\"id\":\"691896200584\",\"code\":\"901215\",\"text\":\"裕湘绿豆面\",\"specifications\":\"900g\",\"unit\":\"包\",\"price\":\"5.59\",\"keyword\":\"YXLDM\"},{\"id\":\"690799251154\",\"code\":\"863552\",\"text\":\"伊利QQ星儿童成长奶营养均膳型\",\"specifications\":\"190ml\",\"unit\":\"盒\",\"price\":\"3.24\",\"keyword\":\"YLXETCZNYYYSX,YLXETCZNYYJSX,YLXETCCNYYYSX,YLXETCCNYYJSX\"},{\"id\":\"692777090198\",\"code\":\"890737\",\"text\":\"山花红枣杯酸奶\",\"specifications\":\"100g\",\"unit\":\"杯\",\"price\":\"1.62\",\"keyword\":\"SHHZBSN,SHGZBSN\"},{\"id\":\"506047840047\",\"code\":\"488292\",\"text\":\"牛轰轰阙宇豪小弟弟吸吸棒\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"1.22\",\"keyword\":\"NHHQYHXDDXXB\"},{\"id\":\"692840952176\",\"code\":\"440493\",\"text\":\"佳益新蓝风8连包\",\"specifications\":\"2880抽\",\"unit\":\"提\",\"price\":\"16.93\",\"keyword\":\"JYXLFLB\"},{\"id\":\"690799251318\",\"code\":\"458554\",\"text\":\"伊利畅意100乳酸菌\",\"specifications\":\"330ml\",\"unit\":\"瓶\",\"price\":\"4.05\",\"keyword\":\"YLCYRSJ\"},{\"id\":\"690107060057\",\"code\":\"826686\",\"text\":\"云南白药牙膏留兰香型\",\"specifications\":\"180g\",\"unit\":\"支\",\"price\":\"27.38\",\"keyword\":\"YNBYYGLLXX\"},{\"id\":\"692225545142\",\"code\":\"870998\",\"text\":\"百岁山矿泉水\",\"specifications\":\"570ml\",\"unit\":\"瓶\",\"price\":\"2.43\",\"keyword\":\"BSSKQS\"},{\"id\":\"692416071354\",\"code\":\"422905\",\"text\":\"无穷香辣烤小腿\",\"specifications\":\"13g\",\"unit\":\"包\",\"price\":\"2.03\",\"keyword\":\"WQXLKXT,MQXLKXT\"},{\"id\":\"692481080080\",\"code\":\"827494\",\"text\":\"卡士鲜酪乳原味\",\"specifications\":\"100g\",\"unit\":\"杯\",\"price\":\"4.05\",\"keyword\":\"QSXLRYW,KSXLRYW\"},{\"id\":\"692530377310\",\"code\":\"756872\",\"text\":\"统一来一桶老坛酸菜牛肉面\",\"specifications\":\"127g\",\"unit\":\"桶\",\"price\":\"3.24\",\"keyword\":\"TYLYTLTSCNRM\"},{\"id\":\"692737000340\",\"code\":\"482398\",\"text\":\"咪咪虾条Q包\",\"specifications\":\"240g\",\"unit\":\"袋\",\"price\":\"8.02\",\"keyword\":\"MMXTB,MMHTB\"},{\"id\":\"692364427188\",\"code\":\"824226\",\"text\":\"蒙牛妙妙乳饮料草莓味\",\"specifications\":\"125ml\",\"unit\":\"盒\",\"price\":\"1.22\",\"keyword\":\"MNMMRYLCMW\"},{\"id\":\"690799210004\",\"code\":\"520760\",\"text\":\"伊利AD钙奶\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"1.62\",\"keyword\":\"YLGN\"},{\"id\":\"690102803691\",\"code\":\"532259\",\"text\":\"黄果树佳品84全硬烤\",\"specifications\":\"\",\"unit\":\"包\",\"price\":\"5.27\",\"keyword\":\"HGSJPQYK\"},{\"id\":\"690799210358\",\"code\":\"480148\",\"text\":\"伊利U型杯红枣\",\"specifications\":\"160g\",\"unit\":\"杯\",\"price\":\"2.43\",\"keyword\":\"YLXBHZ,YLXBGZ\"},{\"id\":\"693686921566\",\"code\":\"484358\",\"text\":\"味芝元酱鸭脖\",\"specifications\":\"30g\",\"unit\":\"袋\",\"price\":\"1.62\",\"keyword\":\"WZYJYB\"},{\"id\":\"692689252205\",\"code\":\"5710\",\"text\":\"银鹭花生牛奶\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"1.62\",\"keyword\":\"YLHSNN\"},{\"id\":\"693816692032\",\"code\":\"807070\",\"text\":\"和丝露苹果醋(无糖)\",\"specifications\":\"488ml\",\"unit\":\"瓶\",\"price\":\"4.05\",\"keyword\":\"HSLPGCWT,HSLPGCMT\"},{\"id\":\"692347610944\",\"code\":\"104624\",\"text\":\"倍加洁超柔弹力护齿牙刷\",\"specifications\":\"\",\"unit\":\"支\",\"price\":\"4.21\",\"keyword\":\"BJJCRTLHCYS,BJJCRDLHCYS\"},{\"id\":\"690324437097\",\"code\":\"118364\",\"text\":\"七度空间纯棉夜用卫生巾\",\"specifications\":\"10片\",\"unit\":\"包\",\"price\":\"8.02\",\"keyword\":\"QDKJCMYYWSJ\"},{\"id\":\"692461580128\",\"code\":\"420954\",\"text\":\"湘盐绿色加碘精制盐\",\"specifications\":\"400g\",\"unit\":\"包\",\"price\":\"0.81\",\"keyword\":\"XYLSJDJZY\"},{\"id\":\"693483413044\",\"code\":\"855270\",\"text\":\"南山老酸奶\",\"specifications\":\"180g\",\"unit\":\"杯\",\"price\":\"4.46\",\"keyword\":\"NSLSN\"},{\"id\":\"694015941002\",\"code\":\"733810\",\"text\":\"百事可乐\",\"specifications\":\"600ml\",\"unit\":\"瓶\",\"price\":\"2.43\",\"keyword\":\"BSKY,BSKL\"},{\"id\":\"489102816445\",\"code\":\"968165\",\"text\":\"维他柠檬茶\",\"specifications\":\"250ml\",\"unit\":\"瓶\",\"price\":\"2.27\",\"keyword\":\"WTNMC\"},{\"id\":\"690799251316\",\"code\":\"438459\",\"text\":\"伊利铁罐金装核桃乳\",\"specifications\":\"240ml\",\"unit\":\"瓶\",\"price\":\"3.65\",\"keyword\":\"YLTGJZHTR\"},{\"id\":\"692364424135\",\"code\":\"106707\",\"text\":\"蒙牛早餐麦香味牛奶\",\"specifications\":\"250ml\",\"unit\":\"盒\",\"price\":\"2.27\",\"keyword\":\"MNZCMXWNN\"},{\"id\":\"691643220001\",\"code\":\"117213\",\"text\":\"长康白醋\",\"specifications\":\"500ml\",\"unit\":\"瓶\",\"price\":\"3.24\",\"keyword\":\"ZKBC,CKBC\"}]"; - var data = json.ToObject(); - if (!string.IsNullOrEmpty(keyword)) - { - data = GetDataFilter(data, "code like '%" + keyword + "%' or text like '%" + keyword + "%' or keyword like '%" + keyword + "%'"); - } - return new { list = data }; - } - - #endregion - - #region POST - - /// - /// 保存数据. - /// - /// 主键值. - /// 请求参数. - /// - [HttpPost("{id}")] - public async Task Save(string id, [FromBody] OrderCrInput input) - { - var orderEntity = input.Adapt(); - orderEntity.Id = id; - var orderEntryList = input.goodsList.Adapt>(); - var orderReceivableList = input.collectionPlanList.Adapt>(); - if (orderEntryList.IsNotEmptyOrNull()) - { - foreach (var itemEntity in orderEntryList) - { - itemEntity.Id = SnowflakeIdHelper.NextId(); - itemEntity.OrderId = orderEntity.Id; - itemEntity.SortCode = orderEntryList.IndexOf(itemEntity); - } - } - - if (orderEntryList.IsNotEmptyOrNull()) - { - foreach (var itemEntity in orderReceivableList) - { - itemEntity.Id = YitIdHelper.NextId().ToString(); - itemEntity.OrderId = orderEntity.Id; - itemEntity.SortCode = orderReceivableList.IndexOf(itemEntity); - } - } - - if (_repository.IsAny(x => x.Id == orderEntity.Id)) - { - await _repository.AsSugarClient().Deleteable(x => x.OrderId == id).ExecuteCommandAsync(); - await _repository.AsSugarClient().Deleteable(x => x.OrderId == id).ExecuteCommandAsync(); - await _repository.AsSugarClient().Insertable(orderEntryList).ExecuteCommandAsync(); - await _repository.AsSugarClient().Insertable(orderReceivableList).ExecuteCommandAsync(); - await _repository.AsSugarClient().Updateable(orderEntity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandAsync(); - } - else - { - _cacheManager.Del(string.Format("{0}{1}_{2}", CommonConst.CACHEKEYBILLRULE, _userManager.TenantId, _userManager.UserId + "OrderNumber")); - await _repository.AsSugarClient().Insertable(orderEntryList).ExecuteCommandAsync(); - await _repository.AsSugarClient().Insertable(orderReceivableList).ExecuteCommandAsync(); - await _repository.AsSugarClient().Insertable(orderEntity).CallEntityMethod(m => m.Create()).ExecuteCommandAsync(); - } - } - - /// - /// 删除. - /// - /// 主键值 - /// - [HttpDelete("{id}")] - public async Task Delete(string id) - { - var entity = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null); - if (entity != null) - { - await _repository.AsSugarClient().Deleteable(x => x.OrderId == id).ExecuteCommandAsync(); - await _repository.AsSugarClient().Deleteable(x => x.OrderId == id).ExecuteCommandAsync(); - await _repository.AsSugarClient().Updateable(entity).CallEntityMethod(m => m.Delete()).UpdateColumns(it => new { it.DeleteMark, it.DeleteTime, it.DeleteUserId }).ExecuteCommandHasChangeAsync(); - var flowTaskEntity = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.Id == entity.Id); - if (flowTaskEntity.IsNotEmptyOrNull()) - { - await _repository.AsSugarClient().Updateable(flowTaskEntity).CallEntityMethod(m => m.Delete()).UpdateColumns(it => new { it.DeleteMark, it.DeleteTime, it.DeleteUserId }).ExecuteCommandHasChangeAsync(); - } - foreach (var item in entity.FileJson.ToList()) - { - if (item.IsNotEmptyOrNull()) - { - await _fileManager.DeleteFile(Path.Combine(FileVariable.SystemFilePath, item.FileName)); - } - } - } - } - #endregion - - #region PrivateMethod - - /// - /// 根据字段过滤表的内容. - /// - /// 表数据. - /// 条件. - /// - private DataTable GetDataFilter(DataTable data, string condition) - { - if (data != null && data.Rows.Count > 0) - { - if (condition.Trim() == string.Empty) - { - return data; - } - else - { - DataTable newdt = new DataTable(); - newdt = data.Clone(); - DataRow[] dr = data?.Select(condition); - for (int i = 0; i < dr.Length; i++) - { - newdt.ImportRow((DataRow)dr[i]); - } - return newdt; - } - } - else - { - return new DataTable(); - } - } - - /// - /// 获取表里前几条数据. - /// - /// 表数据 - /// - /// - private DataTable GetSelectTop(DataTable data, int top) - { - if (data.Rows.Count < top) return data; - DataTable NewTable = data.Clone(); - DataRow[] rows = data.Select("1=1"); - for (int i = 0; i < top; i++) - { - NewTable.ImportRow((DataRow)rows[i]); - } - return NewTable; - } - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/ProductClassifyService.cs b/extend/Tnb.Extend/ProductClassifyService.cs deleted file mode 100644 index 6b77a037..00000000 --- a/extend/Tnb.Extend/ProductClassifyService.cs +++ /dev/null @@ -1,117 +0,0 @@ -using JNPF.Common.Core.Manager; -using JNPF.Common.Enums; -using JNPF.Common.Security; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.ProductClassify; -using JNPF.FriendlyException; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; - -namespace JNPF.Extend; - -/// -/// 产品分类. -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "Classify", Order = 600)] -[Route("api/extend/saleOrder/[controller]")] -public class ProductClassifyService : IDynamicApiController, ITransient -{ - /// - /// 服务基础仓储. - /// - private readonly ISqlSugarRepository _repository; - - /// - /// 用户管理. - /// - private readonly IUserManager _userManager; - - public ProductClassifyService( - ISqlSugarRepository repository, - IUserManager userManager) - { - _repository = repository; - _userManager = userManager; - } - - #region GET - - /// - /// 列表. - /// - /// - [HttpGet("")] - public async Task GetList() - { - var data = await _repository.AsQueryable().Where(t => t.DeleteMark == null).OrderBy(a => a.CreatorTime, OrderByType.Desc).ToListAsync(); - List? treeList = data.Adapt>(); - return new { list = treeList.ToTree("-1") }; - } - - /// - /// 获取订单示例. - /// - /// 主键值. - /// - [HttpGet("{id}")] - public async Task GetInfo(string id) - { - return (await _repository.AsQueryable().FirstAsync(a => a.Id.Equals(id) && a.DeleteMark == null)).Adapt(); - } - - #endregion - - #region POST - - /// - /// 新建. - /// - /// 请求参数. - /// - [HttpPost("")] - public async Task Create([FromBody] ProductClassifyCrInput input) - { - var entity = input.Adapt(); - entity.Id = SnowflakeIdHelper.NextId(); - var isOk = await _repository.AsInsertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); - if (!(isOk > 0)) throw Oops.Oh(ErrorCode.COM1000); - } - - /// - /// 更新订单示例. - /// - /// 主键值. - /// 参数. - /// - [HttpPut("{id}")] - public async Task Update(string id, [FromBody] ProductClassifyUpInput input) - { - var entity = input.Adapt(); - entity.LastModifyTime = DateTime.Now; - entity.LastModifyUserId = _userManager.UserId; - var isOk = await _repository.AsUpdateable(entity).UpdateColumns(it => new - { - it.ParentId, - it.FullName, - it.LastModifyTime, - it.LastModifyUserId - }).ExecuteCommandAsync(); - if (!(isOk > 0)) throw Oops.Oh(ErrorCode.COM1001); - } - - /// - /// 删除订单示例. - /// - /// - [HttpDelete("{id}")] - public async Task Delete(string id) - { - var isOk = await _repository.AsDeleteable().Where(it => it.Id.Equals(id)).ExecuteCommandAsync(); - if (!(isOk > 0)) throw Oops.Oh(ErrorCode.COM1002); - } - - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/ProductCustomerService.cs b/extend/Tnb.Extend/ProductCustomerService.cs deleted file mode 100644 index 4198f04c..00000000 --- a/extend/Tnb.Extend/ProductCustomerService.cs +++ /dev/null @@ -1,65 +0,0 @@ -using JNPF.Common.Core.Manager; -using JNPF.Common.Filter; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using JNPF.DynamicApiController; -using JNPF.DependencyInjection; -using JNPF.Common.Extension; -using JNPF.Extend.Entitys.Entity; -using JNPF.Extend.Entitys.Dto.Customer; - -namespace JNPF.Extend; - -/// -/// 客户信息. -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "Customer", Order = 600)] -[Route("api/extend/saleOrder/[controller]")] -public class ProductCustomerService : IDynamicApiController, ITransient -{ - /// - /// 服务基础仓储. - /// - private readonly ISqlSugarRepository _repository; - - /// - /// 用户管理. - /// - private readonly IUserManager _userManager; - - public ProductCustomerService( - ISqlSugarRepository repository, - IUserManager userManager) - { - _repository = repository; - _userManager = userManager; - } - - #region GET - - /// - /// 客户列表. - /// - /// - [HttpGet("")] - public async Task GetList([FromQuery] PageInputBase input) - { - var data = await _repository.AsQueryable() - .Where(it => it.Deletemark == null) - .WhereIF(input.keyword.IsNotEmptyOrNull(), x => x.Name.Contains(input.keyword)) - .Select(x => new ProductCustomerListOutput - { - id = x.Id, - code = x.Code, - name = x.Name, - customerName = x.Customername, - address = x.Address, - contactTel = x.ContactTel - }) - .ToListAsync(); - - return new { list = data }; - } - - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/ProductGoodsService.cs b/extend/Tnb.Extend/ProductGoodsService.cs deleted file mode 100644 index 73de5aaf..00000000 --- a/extend/Tnb.Extend/ProductGoodsService.cs +++ /dev/null @@ -1,87 +0,0 @@ -using JNPF.Common.Core.Manager; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.ProductGoods; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; - -namespace JNPF.Extend; - -/// -/// 选择产品. -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "Goods", Order = 600)] -[Route("api/extend/saleOrder/[controller]")] -public class ProductGoodsService : IDynamicApiController, ITransient -{ - /// - /// 服务基础仓储. - /// - private readonly ISqlSugarRepository _repository; - - /// - /// 用户管理. - /// - private readonly IUserManager _userManager; - - public ProductGoodsService( - ISqlSugarRepository repository, - IUserManager userManager) - { - _repository = repository; - _userManager = userManager; - } - - #region GET - - /// - /// 产品列表. - /// - /// - [HttpGet("")] - public async Task GetList([FromQuery] ProductGoodsListQueryInput input) - { - var data = await _repository.AsQueryable() - .Where(it => it.DeleteMark == null) - .WhereIF(!string.IsNullOrEmpty(input.classifyId), it => it.ClassifyId.Equals(input.classifyId)) - .WhereIF(!string.IsNullOrEmpty(input.code), it => it.Code.Contains(input.code)) - .WhereIF(!string.IsNullOrEmpty(input.fullName), it => it.FullName.Contains(input.fullName)) - .Select(it => new ProductGoodsListOutput - { - id = it.Id, - code = it.Code, - fullName = it.FullName, - qty = it.Qty, - }).MergeTable().OrderByIF(string.IsNullOrEmpty(input.sidx), it => it.id).OrderByIF(!string.IsNullOrEmpty(input.sidx), input.sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); - return PageResult.SqlSugarPageResult(data); - } - - /// - /// 商品编码. - /// - /// - [HttpGet("Selector")] - public async Task GetSelectorList([FromQuery] PageInputBase input) - { - var data = await _repository.AsQueryable() - .Where(it => it.DeleteMark == null) - .WhereIF(input.keyword.IsNotEmptyOrNull(), x => x.Code.Contains(input.keyword)) - .Select(it => new ProductGoodsListOutput - { - id = it.Id, - classifyId = it.ClassifyId, - code = it.Code, - fullName = it.FullName, - qty = it.Qty, - type = it.Type, - amount = it.Amount, - money = it.Money, - }).ToListAsync(); - return new { list = data }; - } - - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/ProductService.cs b/extend/Tnb.Extend/ProductService.cs deleted file mode 100644 index 41324786..00000000 --- a/extend/Tnb.Extend/ProductService.cs +++ /dev/null @@ -1,345 +0,0 @@ -using JNPF.Common.Core.Manager; -using JNPF.Common.Enums; -using JNPF.Common.Filter; -using JNPF.Common.Security; -using JNPF.DatabaseAccessor; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.Product; -using JNPF.Extend.Entitys.Dto.ProductEntry; -using JNPF.Extend.Entitys.Model; -using JNPF.FriendlyException; -using JNPF.Systems.Interfaces.System; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; - -namespace JNPF.Extend; - -/// -/// 业务实现:订单示例. -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "Product", Order = 200)] -[Route("api/extend/saleOrder/[controller]")] -public class ProductService : IDynamicApiController, ITransient -{ - /// - /// 服务基础仓储. - /// - private readonly ISqlSugarRepository _repository; - - /// - /// 用户管理. - /// - private readonly IUserManager _userManager; - - /// - /// 单据规则服务. - /// - private readonly IBillRullService _billRullService; - - /// - /// 初始化一个类型的新实例. - /// - public ProductService( - ISqlSugarRepository repository, - IBillRullService billRullService, - IUserManager userManager) - { - _repository = repository; - _billRullService = billRullService; - _userManager = userManager; - } - - #region Get - - /// - /// 获取订单示例. - /// - /// 主键值. - /// - [HttpGet("{id}")] - public async Task GetInfo(string id) - { - return (await _repository.AsQueryable() - .Includes(x => x.productEntryList.Where(it => it.DeleteMark == null).Select(it => new ProductEntryEntity - { - ProductCode = it.ProductCode, - ProductName = it.ProductName, - ProductSpecification = it.ProductSpecification, - Qty = it.Qty, - Type = it.Type, - Money = it.Money, - Price = it.Price, - Amount = it.Amount, - Description = it.Description - }).ToList()) - .Where(it => it.Id.Equals(id) && it.DeleteMark == null) - .ToListAsync(it => new ProductInfoOutput - { - id = it.Id, - code = it.Code, - customerName = it.CustomerName, - customerId = it.CustomerId, - auditName = it.AuditName, - auditDate = it.AuditDate, - goodsWarehouse = it.GoodsWarehouse, - goodsDate = it.GoodsDate, - gatheringType = it.GatheringType, - business = it.Business, - address = it.Address, - contactTel = it.ContactTel, - harvestMsg = it.HarvestMsg, - harvestWarehouse = it.HarvestWarehouse, - issuingName = it.IssuingName, - partPrice = it.PartPrice, - reducedPrice = it.ReducedPrice, - discountPrice = it.DiscountPrice, - description = it.Description, - productEntryList = it.productEntryList.Adapt>() - }))?.FirstOrDefault(); - } - - /// - /// 获取全订单示例. - /// - /// 请求参数. - /// - [HttpGet("Goods")] - public async Task GetAllProductEntryList([FromQuery] ProductListQueryInput input) - { - var data = await _repository.AsQueryable() - .Includes(x => x.productEntryList.Where(it => it.DeleteMark == null).Select(it => new ProductEntryEntity - { - ProductCode = it.ProductCode, - ProductName = it.ProductName, - ProductSpecification = it.ProductSpecification, - Qty = it.Qty, - Type = it.Type, - Money = it.Money, - Price = it.Price, - Amount = it.Amount, - Description = it.Description, - Activity = it.Activity - }).ToList()) - .Where(it => it.DeleteMark == null) - .WhereIF(!string.IsNullOrEmpty(input.code), it => it.Code.Contains(input.code)) - .WhereIF(!string.IsNullOrEmpty(input.customerName), it => it.CustomerName.Contains(input.customerName)) - .OrderByIF(string.IsNullOrEmpty(input.sidx), it => it.Id) - .OrderByIF(!string.IsNullOrEmpty(input.sidx), input.sidx + " " + input.sort) - .ToPagedListAsync(input.currentPage, input.pageSize, it => new ProductListOutput - { - id = it.Id, - code = it.Code, - customerName = it.CustomerName, - business = it.Business, - address = it.Address, - contactTel = it.ContactTel, - salesmanName = it.SalesmanName, - auditState = it.AuditState, - goodsState = it.GoodsState, - closeState = it.CloseState, - closeDate = it.CloseDate, - contactName = it.ContactName, - productEntryList = it.productEntryList.Adapt>() - }); - return PageResult.SqlSugarPageResult(data); - } - - /// - /// 获取订单示例列表. - /// - /// 请求参数. - /// - [HttpGet("")] - public async Task GetList([FromQuery] ProductListQueryInput input) - { - if (input.auditState == "0") - input.auditState = null; - if (input.closeState == "0") - input.closeState = null; - var data = await _repository.AsQueryable() - .Where(it => it.DeleteMark == null) - .WhereIF(!string.IsNullOrEmpty(input.code), it => it.Code.Contains(input.code)) - .WhereIF(!string.IsNullOrEmpty(input.customerName), it => it.CustomerName.Contains(input.customerName)) - .WhereIF(!string.IsNullOrEmpty(input.contactTel), it => it.ContactTel.Contains(input.contactTel)) - .WhereIF(!string.IsNullOrEmpty(input.auditState), it => it.AuditState.Equals(input.auditState)) - .WhereIF(!string.IsNullOrEmpty(input.closeState), it => it.CloseState.Equals(input.closeState)) - .OrderByIF(string.IsNullOrEmpty(input.sidx), it => it.Id).OrderByIF(!string.IsNullOrEmpty(input.sidx), input.sidx + " " + input.sort) - .Select(it => new ProductListOutput - { - id = it.Id, - code = it.Code, - customerName = it.CustomerName, - business = it.Business, - address = it.Address, - contactTel = it.ContactTel, - salesmanName = it.SalesmanName, - auditState = it.AuditState, - goodsState = it.GoodsState, - closeState = it.CloseState, - closeDate = it.CloseDate, - contactName = it.ContactName - }).ToPagedListAsync(input.currentPage, input.pageSize); - return PageResult.SqlSugarPageResult(data); - } - - /// - /// 获取订单示例列表. - /// - /// 请求参数. - /// - [HttpGet("ProductEntry/{id}")] - public async Task GetProductEntryList(string id) - { - string data = "[{\"id\":\"37c995b4044541009fb7e285bcf9845d\",\"productSpecification\":\"120ml\",\"qty\":16,\"money\":510,\"price\":120,\"commandType\":\"唯一码\",\"util\":\"盒\"},{\"id\":\"2dbb11d3cde04c299985ac944d130ba0\",\"productSpecification\":\"150ml\",\"qty\":15,\"money\":520,\"price\":310,\"commandType\":\"唯一码\",\"util\":\"盒\"},{\"id\":\"f8ec261ccdf045e5a2e1f0e5485cda76\",\"productSpecification\":\"40ml\",\"qty\":13,\"money\":530,\"price\":140,\"commandType\":\"唯一码\",\"util\":\"盒\"},{\"id\":\"6c110b57ae56445faa8ce9be501c8997\",\"productSpecification\":\"103ml\",\"qty\":2,\"money\":504,\"price\":150,\"commandType\":\"唯一码\",\"util\":\"盒\"},{\"id\":\"f2ee981aaf934147a4d090a0eed2203f\",\"productSpecification\":\"120ml\",\"qty\":21,\"money\":550,\"price\":160,\"commandType\":\"唯一码\",\"util\":\"盒\"}]"; - List dataAll = data.ToObject>(); - List productEntryList = await _repository.AsSugarClient().Queryable().Where(it => it.ProductId.Equals(id) && it.DeleteMark == null).Select(it => new ProductEntryListOutput - { - productCode = it.ProductCode, - productName = it.ProductName, - qty = it.Qty, - type = it.Type, - activity = it.Activity, - }).ToListAsync(); - - productEntryList.ForEach(item => - { - item.dataList = new List(); - List dataList = new List(); - var randomData = new Random(); - int num = randomData.Next(1, dataAll.Count); - for (int i = 0; i < num; i++) - { - dataList.Add(dataAll[i]); - } - - item.dataList = dataList; - }); - - return new { list = productEntryList }; - } - - #endregion - - #region POST - - /// - /// 新建. - /// - /// 请求参数. - /// - [HttpPost("")] - [UnitOfWork] - public async Task Create([FromBody] ProductCrInput input) - { - var entity = input.Adapt(); - entity.Code = await _billRullService.GetBillNumber("OrderNumber", false); - entity.Id = SnowflakeIdHelper.NextId(); - entity.CreatorTime = DateTime.Now; - entity.CreatorUserId = _userManager.UserId; - - var productEntryList = input.productEntryList.Adapt>(); - if (productEntryList != null) - { - productEntryList.ForEach(item => - { - item.Id = SnowflakeIdHelper.NextId(); - item.ProductId = entity.Id; - item.CreatorTime = DateTime.Now; - item.CreatorUserId = _userManager.UserId; - }); - entity.productEntryList = productEntryList; - } - - var isOk = await _repository.AsSugarClient().InsertNav(entity) - .Include(it => it.productEntryList).ExecuteCommandAsync(); - if (!isOk) - throw Oops.Oh(ErrorCode.COM1000); - } - - /// - /// 更新订单示例. - /// - /// 主键值. - /// 参数. - /// - [HttpPut("{id}")] - [UnitOfWork] - public async Task Update(string id, [FromBody] ProductUpInput input) - { - var entity = input.Adapt(); - entity.LastModifyTime = DateTime.Now; - entity.LastModifyUserId = _userManager.UserId; - - await _repository.AsSugarClient().Updateable() - .Where(it => it.ProductId.Equals(entity.Id) && !input.productEntryList.Select(a => a.id).ToList().Contains(it.Id)) - .SetColumns(it => new ProductEntryEntity() - { - DeleteMark = 1, - DeleteUserId = _userManager.UserId, - DeleteTime = SqlFunc.GetDate() - }).ExecuteCommandAsync(); - - var productEntryList = input.productEntryList.Adapt>(); - productEntryList.ForEach(item => - { - item.Id = item.Id == null ? SnowflakeIdHelper.NextId() : item.Id; - item.ProductId = entity.Id; - }); - - await _repository.AsSugarClient().Storageable(productEntryList).ExecuteCommandAsync(); - - var isOk = await _repository.AsUpdateable(entity).UpdateColumns(it => new - { - it.Code, - it.CustomerName, - it.ContactTel, - it.Address, - it.GoodsWarehouse, - it.Business, - it.GatheringType, - it.PartPrice, - it.ReducedPrice, - it.DiscountPrice, - it.Description, - it.LastModifyUserId, - it.LastModifyTime - }).ExecuteCommandAsync(); - if (!(isOk > 0)) - throw Oops.Oh(ErrorCode.COM1001); - } - - /// - /// 删除订单示例. - /// - /// - [HttpDelete("{id}")] - [UnitOfWork] - public async Task Delete(string id) - { - await _repository.AsSugarClient().Updateable() - .Where(it => it.ProductId.Equals(id)) - .SetColumns(it => new ProductEntryEntity() - { - DeleteMark = 1, - DeleteUserId = _userManager.UserId, - DeleteTime = SqlFunc.GetDate() - }).ExecuteCommandAsync(); - - var isOk = await _repository.AsUpdateable() - .Where(it => it.Id.Equals(id)) - .SetColumns(it => new ProductEntity() - { - DeleteMark = 1, - DeleteUserId = _userManager.UserId, - DeleteTime = SqlFunc.GetDate() - }).ExecuteCommandAsync(); - if (!(isOk > 0)) - throw Oops.Oh(ErrorCode.COM1002); - } - - #endregion - -} \ No newline at end of file diff --git a/extend/Tnb.Extend/ProjectGanttService.cs b/extend/Tnb.Extend/ProjectGanttService.cs deleted file mode 100644 index 502999c3..00000000 --- a/extend/Tnb.Extend/ProjectGanttService.cs +++ /dev/null @@ -1,238 +0,0 @@ -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Security; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.ProjectGantt; -using JNPF.FriendlyException; -using JNPF.Systems.Entitys.Permission; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; - -namespace JNPF.Extend; - -/// -/// 项目计划 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "ProjectGantt", Order = 600)] -[Route("api/extend/[controller]")] -public class ProjectGanttService : IDynamicApiController, ITransient -{ - private readonly ISqlSugarRepository _repository; - - public ProjectGanttService(ISqlSugarRepository repository) - { - _repository = repository; - } - - #region GET - - /// - /// 项目列表. - /// - /// 请求参数 - /// - [HttpGet("")] - public async Task GetList([FromQuery] KeywordInput input) - { - var data = await _repository.AsQueryable().Where(x => x.Type == 1 && x.DeleteMark == null) - .WhereIF(input.keyword.IsNotEmptyOrNull(), x => x.FullName.Contains(input.keyword)) - .OrderBy(x => x.SortCode).OrderBy(x => x.CreatorTime, OrderByType.Desc) - .OrderByIF(!string.IsNullOrEmpty(input.keyword), t => t.LastModifyTime, OrderByType.Desc).ToListAsync(); - var output = data.Adapt>(); - await GetManagersInfo(output); - return new { list = output }; - } - - /// - /// 任务列表. - /// - /// 请求参数. - /// 项目Id. - /// - [HttpGet("{projectId}/Task")] - public async Task GetTaskList([FromQuery] KeywordInput input, string projectId) - { - var data = await _repository.AsQueryable() - .Where(x => x.Type == 2 && x.ProjectId == projectId && x.DeleteMark == null) - .OrderBy(x => x.SortCode).OrderBy(x => x.CreatorTime, OrderByType.Desc) - .OrderByIF(!string.IsNullOrEmpty(input.keyword), t => t.LastModifyTime, OrderByType.Desc).ToListAsync(); - data.Add(await _repository.GetFirstAsync(x => x.Id == projectId)); - if (!string.IsNullOrEmpty(input.keyword)) - { - data = data.TreeWhere(t => t.FullName.Contains(input.keyword), t => t.Id, t => t.ParentId); - } - var output = data.Adapt>(); - return new { list = output.ToTree() }; - } - - /// - /// 任务树形. - /// - /// 项目Id. - /// - [HttpGet("{projectId}/Task/Selector/{id}")] - public async Task GetTaskTreeView(string projectId, string id) - { - var data = (await _repository.AsQueryable().Where(x => x.Type == 2 && x.ProjectId == projectId && x.DeleteMark == null).OrderBy(x => x.CreatorTime, OrderByType.Desc).ToListAsync()); - data.Add(await _repository.GetFirstAsync(x => x.Id == projectId)); - if (!id.Equals("0")) - { - data.RemoveAll(x => x.Id == id); - } - var output = data.Adapt>(); - return new { list = output.ToTree() }; - } - - /// - /// 信息. - /// - /// 主键值. - /// - [HttpGet("{id}")] - public async Task GetInfo(string id) - { - var data = (await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null)).Adapt(); - return data; - } - - /// - /// 项目任务信息. - /// - /// 主键值. - /// - [HttpGet("Task/{taskId}")] - public async Task GetTaskInfo(string taskId) - { - return (await _repository.GetFirstAsync(x => x.Id == taskId && x.DeleteMark == null)).Adapt(); - } - #endregion - - #region POST - - /// - /// 删除. - /// - /// 主键值 - /// - [HttpDelete("{id}")] - public async Task Delete(string id) - { - if (await _repository.IsAnyAsync(x => x.ParentId != id && x.DeleteMark == null)) - { - var entity = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null); - if (entity != null) - { - int isOk = await _repository.AsSugarClient().Updateable(entity).CallEntityMethod(m => m.Delete()).UpdateColumns(it => new { it.DeleteMark, it.DeleteTime, it.DeleteUserId }).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1002); - } - else - { - throw Oops.Oh(ErrorCode.COM1005); - } - } - else - { - throw Oops.Oh(ErrorCode.D1007); - } - } - - /// - /// 创建. - /// - /// 实体对象. - /// - [HttpPost("")] - public async Task Create([FromBody] ProjectGanttCrInput input) - { - if (await _repository.IsAnyAsync(x => x.EnCode == input.enCode && x.DeleteMark == null) || await _repository.IsAnyAsync(x => x.FullName == input.fullName && x.DeleteMark == null)) - throw Oops.Oh(ErrorCode.COM1004); - var entity = input.Adapt(); - entity.Type = 1; - entity.ParentId = "0"; - var isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1000); - } - - /// - /// 编辑. - /// - /// 主键值. - /// 实体对象. - /// - [HttpPut("{id}")] - public async Task Update(string id, [FromBody] ProjectGanttUpInput input) - { - if (await _repository.IsAnyAsync(x => x.Id != id && x.EnCode == input.enCode && x.DeleteMark == null) || await _repository.IsAnyAsync(x => x.Id != id && x.FullName == input.fullName && x.DeleteMark == null)) - throw Oops.Oh(ErrorCode.COM1004); - var entity = input.Adapt(); - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1001); - } - - /// - /// 创建. - /// - /// 实体对象. - /// - [HttpPost("Task")] - public async Task CreateTask([FromBody] ProjectGanttTaskCrInput input) - { - var entity = input.Adapt(); - entity.Type = 2; - var isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1000); - } - - /// - /// 编辑. - /// - /// 主键值. - /// 实体对象. - /// - [HttpPut("Task/{id}")] - public async Task UpdateTask(string id, [FromBody] ProjectGanttTaskUpInput input) - { - var entity = input.Adapt(); - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1001); - } - #endregion - - #region PrivateMethod - - /// - /// 项目参与人员. - /// - /// - /// - private async Task GetManagersInfo(List outputList) - { - foreach (var output in outputList) - { - foreach (var id in output.managerIds.Split(",")) - { - var managerInfo = new ManagersInfo(); - var userInfo = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.Id == id && x.DeleteMark == null); - if (userInfo != null) - { - managerInfo.account = userInfo.RealName + "/" + userInfo.Account; - managerInfo.headIcon = string.IsNullOrEmpty(userInfo.HeadIcon) ? string.Empty : "/api/file/Image/userAvatar/" + userInfo.HeadIcon; - output.managersInfo.Add(managerInfo); - } - } - } - } - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/ScheduleService.cs b/extend/Tnb.Extend/ScheduleService.cs deleted file mode 100644 index 0f8da809..00000000 --- a/extend/Tnb.Extend/ScheduleService.cs +++ /dev/null @@ -1,163 +0,0 @@ -using JNPF.Common.Core.Manager; -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.Schedule; -using JNPF.FriendlyException; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; - -namespace JNPF.Extend; - -/// -/// 项目计划 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "Schedule", Order = 600)] -[Route("api/extend/[controller]")] -public class ScheduleService : IDynamicApiController, ITransient -{ - private readonly ISqlSugarRepository _repository; - private readonly IUserManager _userManager; - - public ScheduleService( - ISqlSugarRepository repository, - IUserManager userManager) - { - _repository = repository; - _userManager = userManager; - } - - #region GET - - /// - /// 列表. - /// - /// 参数 - /// - [HttpGet("")] - public async Task GetList([FromQuery] ScheduleListQuery input) - { - var data = await _repository.AsQueryable() - .Where(x => x.CreatorUserId == _userManager.UserId && x.StartTime >= input.startTime.ParseToDateTime() && x.EndTime <= input.endTime.ParseToDateTime() && x.DeleteMark == null).OrderBy(x => x.StartTime, OrderByType.Desc).ToListAsync(); - var output = data.Adapt>(); - return new { list = output }; - } - - /// - /// 信息. - /// - /// 主键值 - /// - [HttpGet("{id}")] - public async Task GetInfo(string id) - { - return (await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null)).Adapt(); - } - - /// - /// app. - /// - /// - /// - [HttpGet("AppList")] - public async Task GetAppList([FromQuery] ScheduleListQuery input) - { - var days = new Dictionary(); - var data = await _repository.AsQueryable() - .Where(x => x.CreatorUserId == _userManager.UserId && x.StartTime >= input.startTime.ParseToDateTime() && x.EndTime <= input.endTime.ParseToDateTime() && x.DeleteMark == null) - .OrderBy(x => x.StartTime, OrderByType.Desc).ToListAsync(); - var output = data.Adapt>(); - foreach (var item in GetAllDays(input.startTime.ParseToDateTime(), input.endTime.ParseToDateTime())) - { - var _startTime = item.ToString("yyyy-MM-dd") + " 23:59"; - var _endTime = item.ToString("yyyy-MM-dd") + " 00:00"; - var count = output.FindAll(m => m.startTime <= _startTime.ParseToDateTime() && m.endTime >= _endTime.ParseToDateTime()).Count; - days.Add(item.ToString("yyyyMMdd"), count); - } - var today_startTime = input.dateTime + " 23:59"; - var today_endTime = input.dateTime + " 00:00"; - return new - { - signList = days, - todayList = output.FindAll(m => m.startTime <= today_startTime.ParseToDateTime() && m.endTime >= today_endTime.ParseToDateTime()) - }; - } - - #endregion - - #region POST - - /// - /// 新建. - /// - /// 实体对象 - /// - [HttpPost("")] - public async Task Create([FromBody] ScheduleCrInput input) - { - var entity = input.Adapt(); - var isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Creator()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1000); - } - - /// - /// 更新 - /// - /// 主键值 - /// 实体对象 - /// - [HttpPut("{id}")] - public async Task Update(string id, [FromBody] ScheduleUpInput input) - { - var entity = input.Adapt(); - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1001); - } - - /// - /// 删除. - /// - /// 主键值 - /// - [HttpDelete("{id}")] - public async Task Delete(string id) - { - var entity = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null); - if (entity == null) - throw Oops.Oh(ErrorCode.COM1005); - var isOk = await _repository.AsSugarClient().Updateable(entity).CallEntityMethod(m => m.Delete()).UpdateColumns(it => new { it.DeleteMark, it.DeleteTime, it.DeleteUserId }).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1002); - } - - #endregion - - #region PrivateMethod - - /// - /// 获取固定日期范围内的所有日期,以数组形式返回. - /// - /// - /// - private DateTime[] GetAllDays(DateTime startTime, DateTime endTime) - { - var listDay = new List(); - DateTime dtDay = new DateTime(); - //循环比较,取出日期; - for (dtDay = startTime; dtDay.CompareTo(endTime) <= 0; dtDay = dtDay.AddDays(1)) - { - listDay.Add(dtDay); - } - return listDay.ToArray(); - } - - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/TableExampleService.cs b/extend/Tnb.Extend/TableExampleService.cs deleted file mode 100644 index 6b1aa2fe..00000000 --- a/extend/Tnb.Extend/TableExampleService.cs +++ /dev/null @@ -1,385 +0,0 @@ -using System.Reflection; -using JNPF.Common.Core.Manager; -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Security; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.TableExample; -using JNPF.Extend.Entitys.Model; -using JNPF.FriendlyException; -using JNPF.LinqBuilder; -using JNPF.Systems.Entitys.Permission; -using JNPF.Systems.Entitys.System; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using SqlSugar; -using Yitter.IdGenerator; - -namespace JNPF.Extend; - -/// -/// 表格示例数据 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "TableExample", Order = 600)] -[Route("api/extend/[controller]")] -public class TableExampleService : IDynamicApiController, ITransient -{ - private readonly ISqlSugarRepository _repository; - private readonly IUserManager _userManager; - - public TableExampleService( - ISqlSugarRepository repository, - IUserManager userManager) - { - _repository = repository; - _userManager = userManager; - } - - #region GET - - /// -  /// 获取表格数据列表. -  /// - /// 请求参数 - /// - [HttpGet("")] - public async Task GetList([FromQuery] PageInputBase input) - { - return await GetPageList(string.Empty, input); - } - - /// - /// 列表(树形表格) - /// - /// - /// - /// - [HttpGet("ControlSample/{typeId}")] - public async Task GetList(string typeId, [FromQuery] PageInputBase input) - { - return await GetPageList(typeId, input); - } - - /// - /// 列表. - /// - /// - [HttpGet("All")] - public async Task GetListAll([FromQuery] KeywordInput input) - { - var list = await _repository.AsSugarClient().Queryable((a, b) => new JoinQueryInfos(JoinType.Left, a.Registrant == b.Id)) - .WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.ProjectCode.Contains(input.keyword) || a.ProjectName.Contains(input.keyword) || a.CustomerName.Contains(input.keyword)).OrderBy(a => a.RegisterDate, OrderByType.Desc) - .Select((a, b) => new TableExampleAllOutput() - { - id = a.Id, - interactionDate = a.InteractionDate, - projectCode = a.ProjectCode, - projectName = a.ProjectName, - principal = a.Principal, - jackStands = a.JackStands, - projectType = a.ProjectType, - projectPhase = a.ProjectPhase, - customerName = a.CustomerName, - costAmount = a.CostAmount, - tunesAmount = a.TunesAmount, - projectedIncome = a.ProjectedIncome, - registerDate = a.RegisterDate, - registrant = SqlFunc.MergeString(b.RealName, "/", b.Account), - description = a.Description - }).ToListAsync(); - return new { list = list }; - } - - /// - /// 获取延伸扩展列表(行政区划). - /// - /// - [HttpGet("IndustryList")] - public async Task GetIndustryList([FromQuery] KeywordInput input) - { - var data = (await _repository.AsSugarClient().Queryable() - .WhereIF(input.keyword.IsNotEmptyOrNull(), x => x.EnCode.Contains(input.keyword) || x.FullName.Contains(input.keyword)) - .Where(m => m.ParentId == "-1" && m.DeleteMark == null).ToListAsync()).Adapt>(); - return new { list = data }; - } - - /// - /// 获取城市信息列表(获取延伸扩展列表(行政区划)) - /// - /// - /// - [HttpGet("CityList/{id}")] - public async Task GetCityList(string id) - { - var data = (await _repository.AsSugarClient().Queryable().Where(m => m.ParentId == id && m.DeleteMark == null).ToListAsync()).Adapt>(); - return new { list = data }; - } - - /// - /// 列表(表格树形). - /// - /// - [HttpGet("ControlSample/TreeList")] - public async Task GetTreeList(string isTree) - { - var dicData = await _repository.AsSugarClient().Queryable((a, b) => - new JoinQueryInfos(JoinType.Left, a.DictionaryTypeId == b.Id)).Where((a, b) => b.EnCode == "IndustryType" && a.DeleteMark == null - && b.DeleteMark == null).Select(a => a).ToListAsync(); - var data = dicData.FindAll(x => x.EnabledMark == 1); - var treeList = data.Select(x => new TableExampleTreeListOutput() - { - id = x.Id, - parentId = x.ParentId, - text = x.FullName, - loaded = true, - expanded = true, - ht = x.Adapt>() - }).ToList(); - var output = isTree.IsNotEmptyOrNull() && "1".Equals(isTree) ? treeList.ToTree() : treeList; - return new { list = output }; - } - - /// - /// 信息 - /// - /// 主键值 - /// - [HttpGet, Route("{id}")] - public async Task GetInfo(string id) - { - var data = (await _repository.GetFirstAsync(x => x.Id == id)).Adapt(); - return data; - } - - /// - /// 获取批注 - /// - /// - /// - [HttpGet("{id}/Actions/Postil")] - public async Task GetPostil(string id) - { - var tableExampleEntity = await _repository.GetFirstAsync(x => x.Id == id); - if (tableExampleEntity == null) - throw Oops.Oh(ErrorCode.COM1007); - return new { postilJson = tableExampleEntity.PostilJson }; - } - #endregion - - #region POST - - /// - /// 删除. -  /// - /// 主键值 -  /// - [HttpDelete("{id}")] - public async Task Delete(string id) - { - var entity = await _repository.GetFirstAsync(x => x.Id == id); - if (entity != null) - { - await _repository.DeleteAsync(entity); - } - } - - /// - /// 创建. - /// - /// 实体对象 - /// - [HttpPost("")] - public async Task Create([FromBody] TableExampleCrInput input) - { - var entity = input.Adapt(); - entity.Id = YitIdHelper.NextId().ToString(); - entity.RegisterDate = DateTime.Now; - entity.Registrant = _userManager.UserId; - entity.CostAmount = entity.CostAmount == null ? 0 : entity.CostAmount; - entity.TunesAmount = entity.TunesAmount == null ? 0 : entity.TunesAmount; - entity.ProjectedIncome = entity.ProjectedIncome == null ? 0 : entity.ProjectedIncome; - entity.Sign = "0000000"; - await _repository.InsertAsync(entity); - } - - /// - /// 编辑. - /// - /// 主键 - /// 实体对象 - /// - [HttpPut("{id}")] - public async Task Update(string id, [FromBody] TableExampleUpInput input) - { - var entity = input.Adapt(); - entity.Id = id; - entity.LastModifyTime = DateTime.Now; - entity.LastModifyUserId = _userManager.UserId; - entity.CostAmount = entity.CostAmount == null ? 0 : entity.CostAmount; - entity.TunesAmount = entity.TunesAmount == null ? 0 : entity.TunesAmount; - entity.ProjectedIncome = entity.ProjectedIncome == null ? 0 : entity.ProjectedIncome; - await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); - } - - /// - /// 更新标签. - /// - /// 主键 - /// 实体对象 - /// - [HttpPut("UpdateSign/{id}")] - public async Task UpdateSign(string id, [FromBody] TableExampleSignUpInput input) - { - var tableExampleEntity = await _repository.GetFirstAsync(x => x.Id == id); - tableExampleEntity.Sign = input.sign; - tableExampleEntity.Id = id; - tableExampleEntity.LastModifyTime = DateTime.Now; - tableExampleEntity.LastModifyUserId = _userManager.UserId; - await _repository.AsSugarClient().Updateable(tableExampleEntity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); - } - - /// - /// 行编辑 - /// - /// - /// - /// - [HttpPut("{id}/Actions/RowsEdit")] - public async Task RowEditing(string id, [FromBody] TableExampleRowUpInput input) - { - var entity = input.Adapt(); - entity.Id = id; - entity.CostAmount = entity.CostAmount == null ? 0 : entity.CostAmount; - entity.TunesAmount = entity.TunesAmount == null ? 0 : entity.TunesAmount; - entity.ProjectedIncome = entity.ProjectedIncome == null ? 0 : entity.ProjectedIncome; - var tableExampleEntity = await _repository.GetFirstAsync(x => x.Id == id); - var exampleEntity = BindModelValue(tableExampleEntity, entity); - exampleEntity.LastModifyTime = DateTime.Now; - exampleEntity.LastModifyUserId = _userManager.UserId; - await _repository.AsSugarClient().Updateable(tableExampleEntity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); - } - - - /// - /// 发送批注 - /// - /// - /// - /// - [HttpPost("{id}/Postil")] - public async Task SendPostil(string id, [FromBody] TableExamplePostilSendInput input) - { - var tableExampleEntity = await _repository.GetFirstAsync(x => x.Id == id); - if (tableExampleEntity == null) - throw Oops.Oh(ErrorCode.COM1005); - var model = new PostilModel() - { - userId = string.Format("{0}/{1}", _userManager.Account, _userManager.RealName), - text = input.text, - creatorTime = DateTime.Now - }; - var list = new List(); - list.Add(model); - if (tableExampleEntity.PostilJson.IsNotEmptyOrNull()) - { - list = list.Concat(tableExampleEntity.PostilJson.ToList()).ToList(); - } - tableExampleEntity.PostilJson = JsonConvert.SerializeObject(list, new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" }); - tableExampleEntity.PostilCount = list.Count; - tableExampleEntity.Id = id; - tableExampleEntity.LastModifyTime = DateTime.Now; - tableExampleEntity.LastModifyUserId = _userManager.UserId; - await _repository.AsSugarClient().Updateable(tableExampleEntity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); - } - - /// - /// 删除批注 - /// - /// 主键值 - /// 请求参数 - /// - [HttpDelete("{id}/Postil/{index}")] - public async Task DeletePostil(string id, int index) - { - var tableExampleEntity = await _repository.GetFirstAsync(x => x.Id == id); - if (tableExampleEntity == null) - throw Oops.Oh(ErrorCode.COM1005); - var list = tableExampleEntity.PostilJson.ToList(); - list.Remove(list[index]); - tableExampleEntity.PostilJson = list.ToJsonString(); - tableExampleEntity.PostilCount = list.Count; - tableExampleEntity.Id = id; - tableExampleEntity.LastModifyTime = DateTime.Now; - tableExampleEntity.LastModifyUserId = _userManager.UserId; - await _repository.AsSugarClient().Updateable(tableExampleEntity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); - } - #endregion - - #region PrivateMethod - - /// - /// 分页列表. - /// - /// - /// - /// - private async Task GetPageList(string typeId, PageInputBase input) - { - var list = await _repository.AsSugarClient().Queryable((a, b) => new JoinQueryInfos(JoinType.Left, a.Registrant == b.Id)) - .WhereIF(typeId.IsNotEmptyOrNull(), a => a.ProjectType == typeId) - .WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.ProjectCode.Contains(input.keyword) || a.ProjectName.Contains(input.keyword)) - .OrderBy(a => a.RegisterDate, OrderByType.Desc) - .Select((a, b) => new TableExampleListOutput() - { - id = a.Id, - interactionDate = a.InteractionDate, - projectCode = a.ProjectCode, - projectName = a.ProjectName, - principal = a.Principal, - jackStands = a.JackStands, - projectType = a.ProjectType, - projectPhase = a.ProjectPhase, - customerName = a.CustomerName, - costAmount = a.CostAmount, - tunesAmount = a.TunesAmount, - projectedIncome = a.ProjectedIncome, - registerDate = a.RegisterDate, - registrant = SqlFunc.MergeString(b.RealName, "/", b.Account), - description = a.Description, - sign = a.Sign, - postilJson = a.Sign, - postilCount = a.PostilCount.ToString(), - }).ToPagedListAsync(input.currentPage, input.pageSize); - return PageResult.SqlSugarPageResult(list); - } - - /// - /// 将实体2的值动态赋值给实体1(名称一样的属性进行赋值) - /// - /// 实体1 - /// 实体2 - /// 赋值后的model1 - private T1 BindModelValue(T1 entity1, T2 entity2) where T1 : class where T2 : class - { - Type t1 = entity1.GetType(); - Type t2 = entity2.GetType(); - PropertyInfo[] property2 = t2.GetProperties(); - //排除字段 - List exclude = new List() { "F_Id", "F_Registrant", "F_RegisterDate", "F_SortCode", "F_Sign", "F_PostilJson", "F_PostilCount" }; - foreach (PropertyInfo p in property2) - { - if (exclude.Contains(p.Name)) { continue; } - t1.GetProperty(p.Name)?.SetValue(entity1, p.GetValue(entity2, null)); - } - return entity1; - } - #endregion -} \ No newline at end of file diff --git a/extend/Tnb.Extend/Tnb.Extend.csproj b/extend/Tnb.Extend/Tnb.Extend.csproj deleted file mode 100644 index 878a7f6d..00000000 --- a/extend/Tnb.Extend/Tnb.Extend.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - net6.0 - enable - enable - True - $(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8618;CS8625;CS1572;CS1573;CS0168;CS4014; - - - - - - - - diff --git a/extend/Tnb.Extend/WorkLogService.cs b/extend/Tnb.Extend/WorkLogService.cs deleted file mode 100644 index 5ea425ba..00000000 --- a/extend/Tnb.Extend/WorkLogService.cs +++ /dev/null @@ -1,205 +0,0 @@ -using JNPF.Common.Core.Manager; -using JNPF.Common.Enums; -using JNPF.Common.Extension; -using JNPF.Common.Filter; -using JNPF.Common.Security; -using JNPF.DependencyInjection; -using JNPF.DynamicApiController; -using JNPF.Extend.Entitys; -using JNPF.Extend.Entitys.Dto.WoekLog; -using JNPF.Extend.Entitys.Dto.WorkLog; -using JNPF.FriendlyException; -using JNPF.Systems.Interfaces.Permission; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using Yitter.IdGenerator; - -namespace JNPF.Extend; - -/// -/// 工作日志 -/// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) -/// 日 期:2021-06-01 . -/// -[ApiDescriptionSettings(Tag = "Extend", Name = "WorkLog", Order = 600)] -[Route("api/extend/[controller]")] -public class WorkLogService : IDynamicApiController, ITransient -{ - private readonly ISqlSugarRepository _repository; - private readonly IUsersService _usersService; - private readonly IUserManager _userManager; - private readonly ITenant _db; - - public WorkLogService(ISqlSugarRepository repository, IUsersService usersService, IUserManager userManager, ISqlSugarClient context) - { - _repository = repository; - _usersService = usersService; - _userManager = userManager; - _db = context.AsTenant(); - } - - #region Get - /// - /// 列表(我发出的) - /// - /// - /// - [HttpGet("Send")] - public async Task GetSendList([FromQuery] PageInputBase input) - { - var list = await _repository.AsQueryable().Where(x => x.CreatorUserId == _userManager.UserId && x.DeleteMark == null) - .WhereIF(input.keyword.IsNotEmptyOrNull(), m => m.Title.Contains(input.keyword) || m.Description.Contains(input.keyword)) - .OrderBy(x => x.SortCode).OrderBy(x => x.CreatorTime, OrderByType.Desc) - .OrderByIF(!string.IsNullOrEmpty(input.keyword), t => t.LastModifyTime, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize); - var pageList = new SqlSugarPagedList() - { - list = list.list.Adapt>(), - pagination = list.pagination - }; - return PageResult.SqlSugarPageResult(pageList); - } - - /// - /// 列表(我收到的) - /// - /// - /// - [HttpGet("Receive")] - public async Task GetReceiveList([FromQuery] PageInputBase input) - { - var list = await _repository.AsSugarClient().Queryable( - (a, b) => new JoinQueryInfos(JoinType.Left, a.Id == b.WorkLogId)) - .Where((a, b) => a.DeleteMark == null && b.ShareUserId == _userManager.UserId) - .WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.Title.Contains(input.keyword)) - .Select(a => new WorkLogListOutput() - { - id = a.Id, - title = a.Title, - question = a.Question, - creatorTime = a.CreatorTime, - todayContent = a.TodayContent, - tomorrowContent = a.TomorrowContent, - toUserId = a.ToUserId, - sortCode = a.SortCode, - lastModifyTime = a.LastModifyTime - }).MergeTable() - .OrderBy(a => a.sortCode).OrderBy(a => a.creatorTime, OrderByType.Desc) - .OrderByIF(!string.IsNullOrEmpty(input.keyword), t => t.lastModifyTime, OrderByType.Desc) - .ToPagedListAsync(input.currentPage, input.pageSize); - return PageResult.SqlSugarPageResult(list); - } - - /// - /// 信息 - /// - /// - /// - [HttpGet("{id}")] - public async Task GetInfo(string id) - { - var output = (await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null)).Adapt(); - output.userIds = output.toUserId; - output.toUserId = await _usersService.GetUserName(output.toUserId); - return output; - } - #endregion - - #region Post - - /// - /// 添加. - /// - /// - /// - [HttpPost("")] - public async Task Create([FromBody] WorkLogCrInput input) - { - try - { - var entity = input.Adapt(); - entity.Id = SnowflakeIdHelper.NextId(); - List workLogShareList = entity.ToUserId.Split(',').Select(x => new WorkLogShareEntity() - { - Id = YitIdHelper.NextId().ToString(), - ShareTime = DateTime.Now, - WorkLogId = entity.Id, - ShareUserId = x - }).ToList(); - _db.BeginTran(); - _repository.AsSugarClient().Insertable(workLogShareList).ExecuteCommand(); - var isOk = await _repository.AsSugarClient().Insertable(entity).CallEntityMethod(m => m.Create()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1000); - _db.CommitTran(); - } - catch (Exception) - { - _db.RollbackTran(); - throw Oops.Oh(ErrorCode.COM1000); - } - } - - /// - /// 修改 - /// - /// - /// - /// - [HttpPut("{id}")] - public async Task Update(string id, [FromBody] WorkLogUpInput input) - { - try - { - var entity = input.Adapt(); - List workLogShareList = entity.ToUserId.Split(',').Select(x => new WorkLogShareEntity() - { - Id = YitIdHelper.NextId().ToString(), - ShareTime = DateTime.Now, - WorkLogId = entity.Id, - ShareUserId = x - }).ToList(); - _db.BeginTran(); - _repository.AsSugarClient().Deleteable(workLogShareList).ExecuteCommand(); - _repository.AsSugarClient().Insertable(workLogShareList).ExecuteCommand(); - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1001); - _db.CommitTran(); - } - catch (Exception) - { - _db.RollbackTran(); - throw Oops.Oh(ErrorCode.COM1001); - } - } - - /// - /// 删除 - /// - /// - /// - [HttpDelete("{id}")] - public async Task Delete(string id) - { - try - { - var entity = await _repository.GetFirstAsync(x => x.Id == id && x.DeleteMark == null); - if (entity == null) - throw Oops.Oh(ErrorCode.COM1005); - _db.BeginTran(); - _repository.AsSugarClient().Deleteable(x => x.WorkLogId == id).ExecuteCommand(); - var isOk = await _repository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.Delete()).ExecuteCommandAsync(); - if (isOk < 1) - throw Oops.Oh(ErrorCode.COM1002); - _db.CommitTran(); - } - catch (Exception) - { - _db.RollbackTran(); - throw Oops.Oh(ErrorCode.COM1002); - } - } - #endregion -} \ No newline at end of file diff --git a/request.http b/request.http new file mode 100644 index 00000000..5234e8af --- /dev/null +++ b/request.http @@ -0,0 +1,86 @@ +@host=http://localhost:9231 +//@host=http://api.tuotong-tech.com + +### 用户登录 +# @name login +POST {{host}}/api/oauth/Login +Content-Type: application/x-www-form-urlencoded + +origin=password&code=&account=admin&login_type=&jnpf_ticket=&socialsOptions.IsCustom=false&isSocialsLoginCallBack=false&socialsOptions.ConfigId=×tamp=&online_ticket=&password=f5252ff163e76623601a9a84d275c842&socialsOptions.IsMasterSlaveSeparation=false + +### 获取token +@token=Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOiIyNDc1NTMxNzY0OTQyOSIsIkFjY291bnQiOiJhZG1pbiIsIlVzZXJOYW1lIjoi6LaF57qn566h55CG5ZGYIiwiT3JnSWQiOiIyNDc1NTQ2OTg5ODAwNSIsIkFkbWluaXN0cmF0b3IiOjEsIlRlbmFudElkIjoiZGVmYXVsdCIsIkNvbm5lY3Rpb25Db25maWciOnsiQ29uZmlnSWQiOiJkZWZhdWx0IiwiSXNDdXN0b20iOmZhbHNlLCJJc01hc3RlclNsYXZlU2VwYXJhdGlvbiI6ZmFsc2UsIkNvbmZpZ0xpc3QiOlt7IklzTWFzdGVyIjp0cnVlLCJTZXJ2aWNlTmFtZSI6InRpYW55aV9iYXMiLCJkYlR5cGUiOjQsImNvbm5lY3Rpb25TdHIiOiJCQUYyMzBERkVGNzhEQjJEMEY2REY1Njg1REU1NjZGRUE5RjQ4NUU1OEFCQjE2RjIwMDIyMDk0QTExMTU4QjdDMDg2NzU0ODM0MjU1NzI4M0Q2RjE0NTRGRjVDM0NDRkI2QjYzMjYyM0E4QTYyMUI2QUY4ODkzNUMwOTcwNzAxOEYxQkNBOENBMTE5RkY0NUY2N0Q0MzdGMEQyMERFRTlEOTFEQzQ1ODk0OTg0NDQyNUVFQUY3QUZENTZGQUM1OTkifV19LCJTaW5nbGVMb2dpbiI6MiwiT25saW5lVGlja2V0IjpudWxsLCJMb2dpblR5cGUiOm51bGwsImlhdCI6MTcwMDAxOTA1NiwibmJmIjoxNzAwMDE5MDU2LCJleHAiOjE3MDc3OTUwNTYsImlzcyI6InR1b3RvbmciLCJhdWQiOiJ0dW90b25nIn0.8BgT-K1uWoADsmIvqGXp_6e3Fb31-X1euodhn3uqXg0 + +///////////////////////////////////////////////////////////////////////// +// 动态模型接口 +///////////////////////////////////////////////////////////////////////// +@vmid=29974114038805 + +### 获取一条数据 +GET {{host}}/api/vengine/{{vmid}}/get?id=3 +Authorization: {{token}} + +### 获取多条数据 +GET {{host}}/api/vengine/{{vmid}}/get-list?pnum=1&psize=10 +Authorization: {{token}} + +### 获取多条数据 +POST {{host}}/api/wms/distask/list +Content-Type: application/json +Authorization: {{token}} + +{ + "pnum": 1, + "psize": 5, + "sort": "", + "k": "", + "q": { + "equip.code": "Elevator4", + //"equip.equipType.code": "004", + //"isSign": ["in", 0, 1] + }, + "o": "billCode,taskType,equip.name,equip.code" + //"o": "billCode,taskType,equip.name,equip.code,equip.equipType.code,equip.equipType.name" + //"o": "*, equip.*, equip.equipType.*" +} + +### 新增 +POST {{host}}/api/vengine/{{vmid}}/create +Content-Type: application/json +Authorization: {{token}} + +{ + +} + +### 修改 +PUT {{host}}/api/vengine/{{vmid}}/update +Content-Type: application/json +Authorization: {{token}} + +{ + +} + +### 删除 +DELETE {{host}}/api/vengine/{{vmid}}/delete?id= +Authorization: {{token}} + +### 获取模型信息 +GET {{host}}/api/tnb/vmodel/get?id=27075467238421 +Authorization: {{token}} + +### 获取多条数据 +POST {{host}}/api/bas/bas-ebom-h/list +Content-Type: application/json +Authorization: {{token}} + +{ + "sort": "", + "k": "", + //"q": {"childMaterials.materialId":"26902083096853"}, + "q": {"materialId":["in","30018625707541","30148036639765","27116721773589"]}, + "o": "id,materialId,version,childMaterials.ebomId,childMaterials.materialId,childMaterials.unitId,childMaterials.quantity,childMaterials.version", + "pnum": 1, + "psize": 5 +} \ No newline at end of file diff --git a/visualdev/Tnb.Vengine/AppService/VengineAppService.cs b/visualdev/Tnb.Vengine/AppService/VengineAppService.cs index 735622de..eacb95fa 100644 --- a/visualdev/Tnb.Vengine/AppService/VengineAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/VengineAppService.cs @@ -43,7 +43,7 @@ public class VengineAppService : BaseAppService, IVengineAppService public async Task GetAsync(string vmid, [FromQuery] VmGetInput input) { var vm = await _dataAccess.GetVmodelAsync(vmid, true); - VmListInput arg = input.Adapt(); + VmQueryInput arg = input.Adapt(); if (input.id != null) { if (arg.q == null) arg.q = new DObject(); @@ -60,7 +60,7 @@ public class VengineAppService : BaseAppService, IVengineAppService public async Task GetListAsync(string vmid, [FromQuery] VmGetListInput input) { var vm = await _dataAccess.GetVmodelAsync(vmid, true); - VmListInput arg = input.Adapt(); + VmQueryInput arg = input.Adapt(); if (!string.IsNullOrEmpty(input.q)) { arg.q = input.q.ToObject(); @@ -73,7 +73,7 @@ public class VengineAppService : BaseAppService, IVengineAppService /// 获取多条 数据列表 /// [HttpPost("api/[area]/[controller]/{vmid}/list")] - public async Task ListAsync(string vmid, [FromBody] VmListInput input) + public async Task ListAsync(string vmid, [FromBody] VmQueryInput input) { var vm = await _dataAccess.GetVmodelAsync(vmid, true); var ls = await _dataAccess.QueryDataAsync(vm, input); @@ -119,7 +119,7 @@ public class VengineAppService : BaseAppService, IVengineAppService private async Task GetVmodelAsync(string areaCode, string vmCode) { - var vm = await _dataAccess.GetVmodelAsync(areaCode, vmCode, true); + var vm = await _dataAccess.GetVmodelAsync(areaCode, vmCode, false); return vm; } @@ -130,7 +130,7 @@ public class VengineAppService : BaseAppService, IVengineAppService public async Task GetAsync(string areaCode, string vmCode, [FromQuery] VmGetInput input) { var vm = await GetVmodelAsync(areaCode, vmCode); - VmListInput arg = input.Adapt(); + VmQueryInput arg = input.Adapt(); if (input.id != null) { if (arg.q == null) arg.q = new DObject(); @@ -147,7 +147,7 @@ public class VengineAppService : BaseAppService, IVengineAppService public async Task GetListAsync(string areaCode, string vmCode, [FromQuery] VmGetListInput input) { var vm = await GetVmodelAsync(areaCode, vmCode); - VmListInput arg = input.Adapt(); + VmQueryInput arg = input.Adapt(); if (!string.IsNullOrEmpty(input.q)) { arg.q = input.q.ToObject(); @@ -160,7 +160,7 @@ public class VengineAppService : BaseAppService, IVengineAppService /// 获取多条 数据列表 /// [HttpPost("api/{areaCode}/{vmCode}/list")] - public async Task ListAsync(string areaCode, string vmCode, [FromBody] VmListInput input) + public async Task ListAsync(string areaCode, string vmCode, [FromBody] VmQueryInput input) { var vm = await GetVmodelAsync(areaCode, vmCode); var ls = await _dataAccess.QueryDataAsync(vm, input); diff --git a/visualdev/Tnb.Vengine/AppService/VengineAppServiceT.cs b/visualdev/Tnb.Vengine/AppService/VengineAppServiceT.cs index 750b130d..dc69c995 100644 --- a/visualdev/Tnb.Vengine/AppService/VengineAppServiceT.cs +++ b/visualdev/Tnb.Vengine/AppService/VengineAppServiceT.cs @@ -34,7 +34,7 @@ public class VengineAppService : BaseAppService where TEntity : Entity _db = _dataAccess.GetSqlSugar(); } - protected async Task GetVmodelAsync() + protected virtual async Task GetVmodelAsync() { var tp = typeof(TEntity); string? area = null, code = null; @@ -53,7 +53,7 @@ public class VengineAppService : BaseAppService where TEntity : Entity { code = tp.Name.ToKebab(); } - var vm = await _dataAccess.GetVmodelAsync(area, code, true); + var vm = await _dataAccess.GetVmodelAsync(area, code, false); return vm; } @@ -65,7 +65,7 @@ public class VengineAppService : BaseAppService where TEntity : Entity public virtual async Task GetAsync([FromQuery] VmGetInput input) { var vm = await GetVmodelAsync(); - VmListInput arg = input.Adapt(); + VmQueryInput arg = input.Adapt(); if (input.id != null) { if (arg.q == null) arg.q = new DObject(); @@ -90,7 +90,7 @@ public class VengineAppService : BaseAppService where TEntity : Entity /// 获取多条 数据列表 /// [HttpPost] - public virtual async Task ListAsync([FromBody] VmListInput input) + public virtual async Task ListAsync([FromBody] VmQueryInput input) { var vm = await GetVmodelAsync(); var ls = await _dataAccess.QueryDataAsync(vm, input); diff --git a/visualdev/Tnb.Vengine/AppService/VmodelAppService.cs b/visualdev/Tnb.Vengine/AppService/VmodelAppService.cs index 9cac3067..d4e2b56a 100644 --- a/visualdev/Tnb.Vengine/AppService/VmodelAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/VmodelAppService.cs @@ -9,6 +9,7 @@ using JNPF.ViewEngine; using Mapster; using Microsoft.AspNetCore.Mvc; using SqlSugar; +using Tnb.Core; using Tnb.Vengine.DataAccess; using Tnb.Vengine.Domain; @@ -65,12 +66,12 @@ public class VmodelAppService : VengineAppService, IVmodelAppService RefAsync total = 0; var data = await q.OrderBy(input.sort).ToPageListAsync((input.pnum - 1) * input.psize, input.psize, total); ret.total = total; - ret.items = data.ConvertAll(a => a); + ret.items = data.Adapt>(); return ret; } [NonAction] - public override Task ListAsync(VmListInput input) + public override Task ListAsync(VmQueryInput input) { return base.ListAsync(input); } @@ -127,12 +128,17 @@ public class VmodelAppService : VengineAppService, IVmodelAppService foreach (var tb in lsTable) { if (!string.IsNullOrEmpty(input.removePrefix) && !tb.Name.StartsWith(input.removePrefix)) continue; + var n = tb.Name.IndexOf('_'); + if (string.IsNullOrEmpty(input.removePrefix) && n > 0 && n < 5) + { + input.removePrefix = tb.Name.Substring(0, n); + } var colInfo = sugar.DbMaintenance.GetColumnInfosByTableName(tb.Name); Vmodel model = new() { dbCode = input.dbCode, vmName = tb.Description, tableName = tb.Name }; model.areaCode = input.areaCode.ToKebab(); model.vmCode = (string.IsNullOrEmpty(input.removePrefix) ? tb.Name.ToKebab() : tb.Name.RemovePreFix(input.removePrefix)).ToKebab(); //model.createId = CurrentUser.Id; - int n = 1; + n = 1; foreach (var p in colInfo) { var prop = p.Adapt(); diff --git a/visualdev/Tnb.Vengine/AppService/VmodelPageAppService.cs b/visualdev/Tnb.Vengine/AppService/VmodelPageAppService.cs index 92f49e22..6bd20bf2 100644 --- a/visualdev/Tnb.Vengine/AppService/VmodelPageAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/VmodelPageAppService.cs @@ -9,6 +9,7 @@ using Mapster; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; using SqlSugar; +using Tnb.Core; using Tnb.Vengine.DataAccess; using Tnb.Vengine.Domain; @@ -48,7 +49,7 @@ public class VmodelPageAppService : VengineAppService, IVmodelPageAp RefAsync total = 0; var data = await q.OrderBy(input.sort).ToPageListAsync((input.pnum - 1) * input.psize, input.psize, total); ret.total = total; - ret.items = data.ConvertAll(a => a); + ret.items = data.Adapt>(); return ret; } diff --git a/visualdev/Tnb.Vengine/DataAccess/DataAccess.cs b/visualdev/Tnb.Vengine/DataAccess/DataAccess.cs index bf523801..32030571 100644 --- a/visualdev/Tnb.Vengine/DataAccess/DataAccess.cs +++ b/visualdev/Tnb.Vengine/DataAccess/DataAccess.cs @@ -1,4 +1,5 @@ using System.Collections.Concurrent; +using System.Diagnostics; using JNPF; using JNPF.Common.Core.Manager; using JNPF.Common.Extension; @@ -37,7 +38,7 @@ public class DataAccess : IDataAccess, ITransient, IDisposable /// /// 全局缓存 /// - private static ConcurrentDictionary DbCache = new ConcurrentDictionary(); + private static readonly ConcurrentDictionary DbCache = new(); /// /// 构造 @@ -52,7 +53,7 @@ public class DataAccess : IDataAccess, ITransient, IDisposable /// public void Dispose() { - foreach (var item in DbCache) + foreach (KeyValuePair item in DbCache) { item.Value.Dispose(); } @@ -73,9 +74,9 @@ public class DataAccess : IDataAccess, ITransient, IDisposable return DbCache[dbCode]; } - var dblink = GetVmodelLink(dbCode); + VmodelLink dblink = GetVmodelLink(dbCode); ThrowIf.IsNull(dblink, $"没有此数据库{dbCode}连接信息"); - var sugar = SugarHelper.CreateSugarClient(dblink.dbCode, dblink.dbType, dblink.dbConnection); + ISqlSugarClient sugar = SugarHelper.CreateSugarClient(dblink.dbCode, dblink.dbType, dblink.dbConnection); if (sugar.Ado.IsValidConnection()) { DbCache[dbCode] = sugar; @@ -93,7 +94,7 @@ public class DataAccess : IDataAccess, ITransient, IDisposable /// public VmodelLink GetVmodelLink(string dbCode) { - var model = Db.Queryable().First(a => a.dbCode == dbCode); + VmodelLink model = Db.Queryable().First(a => a.dbCode == dbCode); return model; } @@ -170,12 +171,12 @@ public class DataAccess : IDataAccess, ITransient, IDisposable private async Task LoadVmodelNavigateAsync(Vmodel vm) { Dictionary dictVm = new(); - var vmids = vm.navProps.Select(a => a.vmid).Distinct().ToList(); - var ls = await Db.Queryable().Where(a => vmids.Contains(a.id)).ToListAsync(); - var navs = ls.ToDictionary(a => a.id); - foreach (var navProp in vm.navProps) + List vmids = vm.navProps.Select(a => a.vmid).Distinct().ToList(); + List ls = await Db.Queryable().Where(a => vmids.Contains(a.id)).ToListAsync(); + Dictionary navs = ls.ToDictionary(a => a.id); + foreach (VmNavProp navProp in vm.navProps) { - navProp.naviModel = (Vmodel)navs.GetOrDefault(navProp.vmid); + navProp.naviModel = navs.GetOrDefault(navProp.vmid); //if (!dictVm.ContainsKey(navProp.vmid)) //{ // var navModel = await GetVmodelAsync(navProp.vmid); @@ -184,54 +185,50 @@ public class DataAccess : IDataAccess, ITransient, IDisposable //navProp.naviModel = dictVm[navProp.vmid]; } } - /// /// 查询数据 默认方法 /// - public async Task QueryDataAsync(Vmodel vm, VmListInput input) + public async Task QueryDataAsync(Vmodel vm, VmQueryInput input) { + //var sw = Stopwatch.StartNew(); ISqlSugarClient db = GetSqlSugar(vm.dbCode); - var query = db.Queryable().AS(vm.tableName, VmSelectProp.MAIN_ALIES); - var selProps = vm.GetVmSelectProps(input.o); - //处理导航属性联表 - List joins = vm.GetJoinInfos(selProps); - //if (joins.Count > 0) - query.AddJoinInfo(joins); - List wheres = vm.GetConditionalModels(input.q); - if (!string.IsNullOrEmpty(input.k)) - { - var lsCondition = new List>(); - var wType = WhereType.And; - foreach (var prop in vm.dbProps.Where(a => a.fuzzy)) - { - lsCondition.Add(new(wType, new ConditionalModel() { FieldName = prop.field, ConditionalType = ConditionalType.Like, FieldValue = input.k, CSharpTypeName = prop.csType })); - wType = WhereType.Or; - } - wheres.Add(new ConditionalCollections() { ConditionalList = lsCondition }); - } - //处理查询参数 - //if (wheres.Count > 0) - query.Where(wheres); - if (!string.IsNullOrEmpty(input.sort)) - { - query.OrderBy(input.sort); - } + ISugarQueryable query = db.Queryable().AS(vm.tableName, VmQueryParser.MAIN_ALIES); + VmQueryParser parser = new(this, vm, input); + parser.ParseQueryInput(); + await parser.LoadNavigateAsync(); + // 处理导航属性联表 + List joins = parser.GetJoinInfos(); + _ = query.AddJoinInfo(joins); + + // 处理查询参数条件 + List wheres = parser.GetConditionalModels(); + wheres.Add(parser.GetKeywordConditional()); + _ = query.Where(wheres); + + // 处理排序字段 + _ = query.OrderBy(parser.GetOrderByModels()); + //处理输出字段 - List selects = vm.GetSelectModels(selProps); - query.Select(selects); + List selects = parser.GetSelectModels(); + _ = query.Select(selects); + //JNPF.Logging.Log.Debug($"解析查询参数耗时:{sw.ElapsedMilliseconds}ms"); + //sw.Restart(); + //查询数据 VmPagedOutput result = new(); - List> ls = new(); int skip = input.pnum > 0 ? (input.pnum - 1) * input.psize : 0; int take = input.psize == 0 ? MAX_PAGE_SIZE : input.psize; if (input.pnum > 0) { result.total = await query.CountAsync(); } - ls = await query.Skip(skip).Take(take).ToDictionaryListAsync(); - //组装输出对象 - foreach (var data in ls) + List> ls = await query.Skip(skip).Take(take).ToDictionaryListAsync(); + //JNPF.Logging.Log.Debug($"查询数据耗时:{sw.ElapsedMilliseconds}ms"); + //sw.Restart(); + + for (int i = 0; i < ls.Count; i++) { - DObject ret = await CombineOutputAsync(vm, new DObject(data), selProps); - result.items.Add(ret); + result.items.Add(new DObject()); } + await CombineOutputAsync(ls, result.items, parser); + //JNPF.Logging.Log.Debug($"组装返回结果耗时:{sw.ElapsedMilliseconds}ms"); return result; } @@ -239,86 +236,66 @@ public class DataAccess : IDataAccess, ITransient, IDisposable /// /// 组装子模型对象 /// - /// - /// - /// - /// - private async Task CombineOutputAsync(Vmodel vm, DObject src, List selProps) + private async Task CombineOutputAsync(List> src, List dest, VmQueryParser parser) { - DObject ret = new(); - foreach (var prop in selProps) + foreach (VmNavigate nav in parser.Navigates.Values) { // 加载主表字段 - if (prop.navType == eNavigateType.None || prop.navCode == VmSelectProp.MAIN_ALIES) + if (nav.path == VmQueryParser.MAIN_ALIES || nav.navConfig.navType == eNavigateType.None) { - if (src.ContainsKey(prop.code)) + foreach (VmSelectProp prop in nav.selects) { - ret.Add(prop.code, src[prop.code]); - } - } - else - { - // 加载关联表字段 - if (prop.navType == eNavigateType.OneToOne) - { - NestedOutput(vm, src, ret, prop); - } - else if (prop.navType == eNavigateType.OneToMany) - { - await NestedOneToManyAsync(vm, src, ret, prop, selProps); - } - else if (prop.navType == eNavigateType.ManyToMany) - { - if (!ret.ContainsKey(prop.navCode)) + for (int i = 0; i < src.Count; i++) { - ret.Add(prop.navCode, new List()); + dest[i].Add(prop.code, src[i].GetOrDefault(prop.code)); } } } - } - return ret; - } - - /// - /// 将一对一的关联表字段嵌入到返回值中 - /// - private void NestedOutput(Vmodel vm, DObject src, DObject ret, VmSelectProp prop) - { - // 以 nav_prop的形式返回 - var key = prop.navCode + "_" + prop.code; - ret.Add(key, src[key]); - // 以 nav.prop的形式返回 - //if (!ret.ContainsKey(prop.navCode)) - //{ - // ret.Add(prop.navCode, new DObject()); - //} - //var key = prop.navCode + "_" + prop.code; - //if (src.ContainsKey(key)) - //{ - // ((DObject)ret[prop.navCode]).Add(prop.code, src[key]); - //} - } - - private async Task NestedOneToManyAsync(Vmodel vm, DObject src, DObject ret, VmSelectProp prop, List selProps) - { - // 在返回值中增加导航属性 - if (ret.ContainsKey(prop.navCode)) - { - return; - } - ret.Add(prop.navCode, new List()); - - // 找到导航属性的配置 - var navCfg = vm.navProps.First(a => a.code == prop.navCode); - if (navCfg != null && navCfg.naviModel != null && src.ContainsKey(navCfg.refField) && navCfg.refCode == VmSelectProp.MAIN_ALIES) - { - VmListInput input = new VmListInput(); - var fkProp = navCfg.naviModel.FieldCodeToPropCode(navCfg.fkField); - if (!string.IsNullOrEmpty(fkProp)) + else if (nav.navConfig.navType == eNavigateType.OneToOne) { - input.q = new DObject(fkProp, src[navCfg.refField]); - input.o = string.Join(',', selProps.Where(a => a.navCode == prop.navCode).Select(a => a.code)); - ret[prop.navCode] = (await QueryDataAsync(navCfg.naviModel, input)).items; + foreach (VmSelectProp prop in nav.selects) + { + string key = prop.asName.Replace(VmQueryParser.PROP_SEPERATE, VmQueryParser.NAVI_SEPERATE); + for (int i = 0; i < src.Count; i++) + { + dest[i].Add(key, src[i].GetOrDefault(prop.asName)); + } + } + } + else if (nav.navConfig.navType == eNavigateType.OneToMany) + { + object[] ids = new object[] { "in" }; + ids = ids.Union(dest.Select(a => a.GetOrDefault(nav.navConfig.refProp)).Where(a => a != null)).ToArray(); + VmQueryInput input = new() + { + q = new DObject(nav.navConfig.fkProp, ids) + }; + nav.wheres.ForEach(a => + { + input.q.Add(a.code, a.value); + }); + input.o = string.Join(',', nav.selects.Select(a => a.code)); + List childs = (await QueryDataAsync(nav.navConfig.naviModel!, input)).items; + for (int i = 0; i < dest.Count; i++) + { + string? fkValue = dest[i][nav.navConfig.refProp]?.ToString(); + dest[i][nav.pathCode] = childs.Where(a => a[nav.navConfig.fkProp]?.ToString() == fkValue).ToList(); + } + //for (int i = 0; i < src.Count; i++) + //{ + // //dest[i].Add(selectVm.pathCode, new List()); + // if (src[i].ContainsKey(refProp)) + // { + // VmQueryInput input = new VmQueryInput(); + // input.q = new DObject(fkProp, src[i][refProp]); + // nav.wheres.ForEach(a => + // { + // input.q.Add(a.code, a.value); + // }); + // input.o = string.Join(',', nav.selects.Select(a => a.code)); + // dest[i][nav.pathCode] = (await QueryDataAsync(nav.navConfig.naviModel, input)).items; + // } + //} } } } @@ -333,31 +310,34 @@ public class DataAccess : IDataAccess, ITransient, IDisposable //新增一条数据 if (input.data != null) { - var pkey = vm.GetPrimary(); - var model = vm.ToCreateEntity(input.data, _user); - if (pkey.csType == "int" || pkey.csType == "long") + VmDbProp pkey = vm.GetPrimary(); + DObject model = vm.ToCreateEntity(input.data, _user); + if (pkey.csType is "int" or "long") { - var id = await db.Insertable(model).AS(vm.tableName).ExecuteReturnBigIdentityAsync(); - if ((long)input.data[pkey.code] != id) input.data[pkey.code] = id; + long id = await db.Insertable(model).AS(vm.tableName).ExecuteReturnBigIdentityAsync(); + if ((long)input.data[pkey.code] != id) + { + input.data[pkey.code] = id; + } } else { - await db.Insertable(model).AS(vm.tableName).ExecuteCommandAsync(); + _ = await db.Insertable(model).AS(vm.tableName).ExecuteCommandAsync(); } return input.data; } //批量新增数据 else { - var pkey = vm.GetPrimary(); - List lst = new List(); - foreach (var item in input.items!) + VmDbProp pkey = vm.GetPrimary(); + List lst = new(); + foreach (DObject item in input.items!) { lst.Add(vm.ToCreateEntity(item, _user)); } if (pkey.csType == "int") { - var ids = await db.Insertable(lst).AS(vm.tableName).ExecuteReturnPkListAsync(); + List ids = await db.Insertable(lst).AS(vm.tableName).ExecuteReturnPkListAsync(); for (int i = 0; i < input.items.Count; i++) { input.items[i][pkey.code] = ids[i]; @@ -365,7 +345,7 @@ public class DataAccess : IDataAccess, ITransient, IDisposable } else if (pkey.csType == "long") { - var ids = await db.Insertable(lst).AS(vm.tableName).ExecuteReturnPkListAsync(); + List ids = await db.Insertable(lst).AS(vm.tableName).ExecuteReturnPkListAsync(); for (int i = 0; i < input.items.Count; i++) { input.items[i][pkey.code] = ids[i]; @@ -373,7 +353,7 @@ public class DataAccess : IDataAccess, ITransient, IDisposable } else { - await db.Insertable(lst).AS(vm.tableName).ExecuteCommandAsync(); + _ = await db.Insertable(lst).AS(vm.tableName).ExecuteCommandAsync(); } return input.items; } @@ -392,12 +372,12 @@ public class DataAccess : IDataAccess, ITransient, IDisposable public async Task UpdateDataAsync(Vmodel vm, VmUpdateInput input) { ISqlSugarClient db = GetSqlSugar(vm.dbCode); - var pk = vm.GetPrimary(); + VmDbProp pk = vm.GetPrimary(); int num = 0; //修改一条数据 if (input.data != null) { - var model = vm.ToUpdateEntity(input.data, _user); + DObject model = vm.ToUpdateEntity(input.data, _user); if (!model.ContainsKey(pk.field)) { throw new Exception($"更新数据时主键({pk.code})不可为空"); @@ -412,9 +392,9 @@ public class DataAccess : IDataAccess, ITransient, IDisposable else if (input.items != null) { List lst = new(); - foreach (var item in input.items) + foreach (DObject item in input.items) { - var model = vm.ToUpdateEntity(item, _user); + DObject model = vm.ToUpdateEntity(item, _user); if (model.ContainsKey(pk.field)) { lst.Add(model); @@ -431,7 +411,7 @@ public class DataAccess : IDataAccess, ITransient, IDisposable public async Task DeleteDataAsync(Vmodel vm, VmDeleteInput input) { ISqlSugarClient db = GetSqlSugar(vm.dbCode); - var pk = vm.GetPrimary(); + VmDbProp pk = vm.GetPrimary(); int num = 0; List> ids = new(); if (input.id != null) diff --git a/visualdev/Tnb.Vengine/DataAccess/IDataAccess.cs b/visualdev/Tnb.Vengine/DataAccess/IDataAccess.cs index c656443f..f6230d52 100644 --- a/visualdev/Tnb.Vengine/DataAccess/IDataAccess.cs +++ b/visualdev/Tnb.Vengine/DataAccess/IDataAccess.cs @@ -48,7 +48,7 @@ public interface IDataAccess : ITransient /// /// 查询数据 默认方法 /// - Task QueryDataAsync(Vmodel vm, VmListInput input); + Task QueryDataAsync(Vmodel vm, VmQueryInput input); //Task CreateDataAsync(VmCreateInput input); /// diff --git a/visualdev/Tnb.Vengine/Domain/VengineDto.cs b/visualdev/Tnb.Vengine/Domain/VengineDto.cs index f83b61a9..9ea1a0aa 100644 --- a/visualdev/Tnb.Vengine/Domain/VengineDto.cs +++ b/visualdev/Tnb.Vengine/Domain/VengineDto.cs @@ -67,9 +67,9 @@ public class VmGetListInput : VmBaseInput /// public string o { get; set; } = "*"; - public VmListInput ToListInput() + public VmQueryInput ToListInput() { - VmListInput arg = this.Adapt(); + VmQueryInput arg = this.Adapt(); if (!string.IsNullOrEmpty(q)) { @@ -83,7 +83,7 @@ public class VmGetListInput : VmBaseInput /// /// 获取多条数据输入参数 /// -public class VmListInput : VmGetListInput +public class VmQueryInput : VmGetListInput { /// /// 查询条件 @@ -152,20 +152,20 @@ public class PagedOutput /// /// 动态分页列表输出对象 /// -public class VmPagedOutput : PagedOutput +public class VmPagedOutput : PagedOutput { } -/// -/// 查询属性信息 -/// -public class VmSelectProp -{ - public const string MAIN_ALIES = "m"; - public string code { get; set; } = string.Empty; - public string field { get; set; } = string.Empty; - public List navPath { get; set; } = new List(); - public string navCode { get; set; } = MAIN_ALIES; - public ePropType propType { get; set; } - public eNavigateType navType { get; set; } -} \ No newline at end of file +///// +///// 查询属性信息 +///// +//public class VmSelectProp +//{ +// public const string MAIN_ALIES = "m"; +// public string code { get; set; } = string.Empty; +// public string field { get; set; } = string.Empty; +// public List navPath { get; set; } = new List(); +// public string navCode { get; set; } = MAIN_ALIES; +// public ePropType propType { get; set; } +// public eNavigateType navType { get; set; } +//} \ No newline at end of file diff --git a/visualdev/Tnb.Vengine/Domain/VmDbProp.cs b/visualdev/Tnb.Vengine/Domain/VmDbProp.cs index b985f776..f45062b0 100644 --- a/visualdev/Tnb.Vengine/Domain/VmDbProp.cs +++ b/visualdev/Tnb.Vengine/Domain/VmDbProp.cs @@ -30,7 +30,7 @@ public class VmDbProp : VmBaseProp /// /// 数据类型 /// - public string? csType { get; set; } + public string csType { get; set; } = "string"; /// /// 长度 diff --git a/visualdev/Tnb.Vengine/Domain/VmNavProp.cs b/visualdev/Tnb.Vengine/Domain/VmNavProp.cs index fd523b2f..4f7d08c9 100644 --- a/visualdev/Tnb.Vengine/Domain/VmNavProp.cs +++ b/visualdev/Tnb.Vengine/Domain/VmNavProp.cs @@ -27,17 +27,17 @@ public class VmNavProp : VmBaseProp /// /// 源表代码,默认为m,表示与主表关联,可设置为中间表导航属性code,用来表示多对多 /// - public string refCode { get; set; } = VmSelectProp.MAIN_ALIES; + public string refCode { get; set; } = VmQueryParser.MAIN_ALIES; /// /// 源表字段, 源表的外键字段 /// - public string refField { get; set; } = string.Empty; + public string refProp { get; set; } = string.Empty; /// /// 导航表字段 /// - public string fkField { get; set; } = string.Empty; + public string fkProp { get; set; } = string.Empty; /// /// 关联模型 diff --git a/visualdev/Tnb.Vengine/Domain/VmQueryParser.cs b/visualdev/Tnb.Vengine/Domain/VmQueryParser.cs index 5f698831..27439be0 100644 --- a/visualdev/Tnb.Vengine/Domain/VmQueryParser.cs +++ b/visualdev/Tnb.Vengine/Domain/VmQueryParser.cs @@ -1,105 +1,508 @@ -using JNPF.Common.Extension; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Drawing.Drawing2D; +using NPOI.OpenXmlFormats.Dml.Diagram; +using SqlSugar; +using Tnb.Core; using Tnb.Vengine.DataAccess; -namespace Tnb.Vengine.Domain +namespace Tnb.Vengine.Domain; + +internal class VmQueryParser { - public class VmQueryParser + public const string MAIN_ALIES = "m"; + public const char NAVI_SEPERATE = '.'; + public const char PROP_SEPERATE = '&'; + + private readonly IDataAccess _dataAccess; + private readonly Vmodel _root; + private readonly VmQueryInput _input; + + public Dictionary Navigates { get; } = new Dictionary(); + public VmQueryParser(IDataAccess dataAccess, Vmodel rootModel, VmQueryInput input) { - private readonly IDataAccess _dataAccess; - private readonly Vmodel _root; - private List _outputs; - private Dictionary _selectProps = new Dictionary(); - private Dictionary _navModels = new Dictionary(); - public VmQueryParser(IDataAccess dataAccess, Vmodel rootModel, string output) - { - _dataAccess = dataAccess; - _root = rootModel; - ParseOutputStr(output); - } - /// - /// 按模型组织要输出的属性 - /// - private void ParseOutputStr(string output) - { - _outputs = output.Split(',').Distinct().ToList(); - _selectProps.Add(Vmodel.MAIN_ALIES, new VmSelect() { navModel = _root }); - foreach (var outStr in _outputs) - { - if (string.IsNullOrWhiteSpace(outStr)) continue; - var codes = outStr.Split('.'); - if (codes.Length == 1) - { - _selectProps[Vmodel.MAIN_ALIES].propCodes.Add(outStr); - continue; - } - var vmPath = ""; - for (int i = 0; i < codes.Length - 1; i++) - { - vmPath = i == 0 ? codes[i] : vmPath + "." + codes[i]; - if (!_selectProps.ContainsKey(vmPath)) - { - _selectProps.Add(vmPath, new VmSelect(vmPath, i + 2)); - } - if (i == codes.Length - 2) - { - _selectProps[vmPath].propCodes.Add(codes[i + 1]); - } - } - } - } - - private async Task LoadNavModel() - { - var keys = _selectProps.Keys.Where(a => a != Vmodel.MAIN_ALIES).OrderBy(a => a).ToList(); - foreach (var selVm in _selectProps.Values) - { - if (_navModels.ContainsKey(selVm.path)) - { - continue; - } - } - var navProps = _root.navProps.Where(a => _selectProps.Values.Any(b => b.path.StartsWith(a.code + "."))).ToList(); - await LoadVmodelNavigateAsync(navProps); - } - private async Task LoadVmodelNavigateAsync(List navProps) - { - var db = _dataAccess.GetSqlSugar(); - - var vmids = navProps.Select(a => a.vmid).Distinct().ToList(); - var navs = await db.Queryable().Where(a => vmids.Contains(a.id)).ToDictionaryAsync(a => a.id, a => a); - foreach (var navProp in navProps) - { - navProp.naviModel = (Vmodel)navs.GetOrDefault(navProp.vmid); - navProp.naviModel.navProps.Where(a => _selectProps.Values.Any(b => b.path.StartsWith(a.code + "."))).ToList(); - } - } + _dataAccess = dataAccess; + _root = rootModel; + _input = input; + } + /// + /// 解析查询参数 + /// + public void ParseQueryInput() + { + // 初始化根模型 + Navigates.Clear(); + VmNavigate main = new(MAIN_ALIES); + main.navConfig.naviModel = _root; + Navigates.Add(MAIN_ALIES, main); + ParseOutputStr(_input.o); + ParseQueryPara(_input.q); + ParseSortPara(_input.sort); } - internal class VmSelect + /// + /// 清除字符串特殊符号 + /// + private string ClearStr(string str) { - public Vmodel? navModel { get; set; } - public string path { get; set; } = Vmodel.MAIN_ALIES; - public int level { get; set; } = 1; - public eNavigateType navType { get; set; } = eNavigateType.None; - public List navPaths { get; set; } = new List(); + return str.Trim(' ', '\r', '\n', '\t'); + } - public List propCodes { get; set; } = new List(); - public List fieldCodes { get; set; } = new List(); + /// + /// 解析输出属性字符串 + /// + private void ParseOutputStr(string output) + { + // t1.t2.id + List outputs = output.Split(',').Distinct().ToList(); + foreach (string? outStr in outputs) + { + _ = ClearStr(outStr); + if (string.IsNullOrWhiteSpace(outStr)) + { + continue; + } + // t1 t2 id + string[] codes = outStr.Split(NAVI_SEPERATE); - public VmSelect() - { - } - public VmSelect(string vmPath, int vmLevel) - { - path = vmPath; - level = vmLevel; + // 根据导航路径添加选择器 + string vmPath = MAIN_ALIES; + for (int i = 0; i < codes.Length - 1; i++) + { + string code = ClearStr(codes[i]); + vmPath = i == 0 ? code : vmPath + NAVI_SEPERATE + code; + if (!Navigates.ContainsKey(vmPath)) + { + Navigates.Add(vmPath, new VmNavigate(vmPath)); + } + } + + // 添加返回的属性到选择器 + string lastCode = ClearStr(codes[^1]); + Navigates[vmPath].selects.Add(new VmSelectProp(lastCode)); } } - internal class NavigateVmodel + /// + /// 解析查询参数 + /// + private void ParseQueryPara(DObject? query) { - public Vmodel? navModel { get; set; } - public string navPath { get; set; } + if (query == null) + { + return; + } + + foreach (KeyValuePair item in query) + { + string[] codes = item.Key.Split(NAVI_SEPERATE); + + // 将导航属性查询条件添加到选择器 + string vmPath = MAIN_ALIES; + for (int i = 0; i < codes.Length - 1; i++) + { + string code = ClearStr(codes[i]); + vmPath = i == 0 ? code : vmPath + NAVI_SEPERATE + code; + if (!Navigates.ContainsKey(vmPath)) + { + Navigates.Add(vmPath, new VmNavigate(vmPath)); + } + } + // 添加返回的属性到选择器 + string lastCode = ClearStr(codes[^1]); + Navigates[vmPath].wheres.Add(new VmWhereProp(lastCode) { value = item.Value }); + } + } + + /// + /// 解析排序参数 + /// + private void ParseSortPara(string? sort) + { + if (string.IsNullOrWhiteSpace(sort)) + { + return; + } + + string[] orders = sort.Split(','); + foreach (string orderStr in orders) + { + _ = ClearStr(orderStr); + if (string.IsNullOrWhiteSpace(orderStr)) + { + continue; + } + // 拆分 m.code desc + string[] codes = orderStr.Split(' ', 1); + // 拆分 m.code + (string?, string) orderPath = codes[0].GetParent(NAVI_SEPERATE); + orderPath.Item1 ??= MAIN_ALIES; + ThrowIf.When(!Navigates.ContainsKey(orderPath.Item1), $"排序参数{orderStr}错误,导航路径{orderPath.Item1}必须包含在输出参数中"); + + VmOrderProp orderby = new(orderPath.Item2); + if (codes.Length == 2) + { + OrderByType? orderType = codes[1].ToLower() switch + { + "asc" => OrderByType.Asc, + "desc" => OrderByType.Desc, + _ => null + }; + ThrowIf.IsNull(orderType, $"排序方式{orderStr}不正确"); + orderby.orderType = orderType.Value; + } + Navigates[orderPath.Item1].orders.Add(orderby); + } + } + + /// + /// 加载单个导航属性模型 + /// + private async Task LoadVmNavigateModelAsync(VmNavigate nav, Dictionary navs) + { + if (nav.navConfig.naviModel != null) + { + return nav.navConfig.naviModel; + } + + // 分割导航路径, a.b.c -> a.b, c + (string?, string) path = nav.path.GetParent(NAVI_SEPERATE); + path.Item1 ??= MAIN_ALIES; + nav.parent = Navigates[path.Item1]; + Vmodel parentVm = await LoadVmNavigateModelAsync(nav.parent, navs); + + // 获取导航属性配置 + nav.navConfig = parentVm.navProps.FirstOrDefault(a => a.code == path.Item2)!; + ThrowIf.IsNull(nav.navConfig, $"模型({parentVm.fullCode})的导航属性{nav.path}配置错误: 找不到(code = {path.Item2})的导航属性"); + + // 获取导航模型 + nav.navConfig.naviModel = await _dataAccess.GetVmodelAsync(nav.navConfig.vmid); + ThrowIf.IsNull(nav.navConfig.naviModel, $"模型({parentVm.fullCode})的导航属性{nav.path}配置错误: 找不到(id = {nav.navConfig.vmid})的模型"); + + // 处理导航模型 + if (nav.navConfig.refCode == MAIN_ALIES) + { + var field = nav.parent.navConfig.naviModel!.PropToFieldCode(nav.navConfig.refProp); + ThrowIf.IsNull(field, $"模型({parentVm.fullCode})的导航属性{nav.path}配置错误: 找不到(code = {nav.navConfig.refProp})的字段"); + field = nav.navConfig.naviModel.PropToFieldCode(nav.navConfig.fkProp); + ThrowIf.IsNull(field, $"模型({parentVm.fullCode})的导航属性{nav.path}配置错误: 在子模型{nav.navConfig.naviModel.fullCode}中找不到(code = {nav.navConfig.fkProp})的字段"); + if (!nav.parent.selects.Any(a => a.code == nav.navConfig.refProp)) + { + nav.parent.selects.Add(new VmSelectProp(nav.navConfig.refProp)); + } + if (!nav.selects.Any(a => a.code == nav.navConfig.fkProp)) + { + nav.selects.Add(new VmSelectProp(nav.navConfig.fkProp)); + } + } + else + { + var navPath = nav.path + NAVI_SEPERATE + nav.navConfig.refCode; + if (!Navigates.ContainsKey(navPath)) + { + VmNavigate midNav = new VmNavigate(navPath); + midNav.navConfig = parentVm.navProps.FirstOrDefault(a => a.code == nav.navConfig.refCode)!; + ThrowIf.IsNull(midNav.navConfig, $"模型({parentVm.fullCode})的导航属性{midNav.path}配置错误: 找不到(code = {nav.navConfig.refCode})的导航属性"); + midNav.navConfig.naviModel = await _dataAccess.GetVmodelAsync(midNav.navConfig.vmid); + ThrowIf.IsNull(midNav.navConfig.naviModel, $"模型({parentVm.fullCode})的导航属性{midNav.path}配置错误: 找不到(id = {midNav.navConfig.vmid})的模型"); + } + } + + return nav.navConfig.naviModel; + } + + /// + /// 加载单个导航属性模型 + /// + public async Task LoadNavigateAsync() + { + Dictionary tobeAdd = new Dictionary(); + foreach (VmNavigate nav in Navigates.Values) + { + _ = await LoadVmNavigateModelAsync(nav, tobeAdd); + } + foreach (var item in tobeAdd) + { + Navigates.Add(item.Key, item.Value); + } + foreach (VmNavigate nav in Navigates.Values) + { + nav.HandleStar(); + nav.LoadDbProp(); + } + } + + /// + /// 处理一对一联表关系,生成联表信息 + /// + /// + /// SELECT * FROM wms_distask_h m INNER JOIN eqp_equipment equip ON m.device_id=equip."id" INNER JOIN eqp_equip_type equipType ON equip.equip_type_id=equipType."id" + /// + public List GetJoinInfos() + { + List joins = new(); + // 主查询中只处理主表和一对一的联表 + IEnumerable navs = Navigates.Values.Where(a => a.path != MAIN_ALIES && a.navConfig.navType == eNavigateType.OneToOne); + foreach (VmNavigate? nav in navs) + { + Debug.Assert(nav.parent != null && nav.navConfig.naviModel != null); + JoinInfoParameter join = new() { TableName = nav.navConfig.naviModel.tableName, ShortName = nav.pathCode, Type = JoinType.Left }; + var refNav = nav.navConfig.refCode == MAIN_ALIES ? nav.parent : Navigates[nav.path + "." + nav.navConfig.refCode]; + var fkField = nav.navConfig.naviModel.PropToFieldCode(nav.navConfig.fkProp); + var refField = refNav.navConfig.naviModel!.PropToFieldCode(nav.navConfig.refProp); + join.Models = ObjectFuncModel.Create("Equals", $"{nav.pathCode}.{fkField}", $"{refNav.pathCode}.{refField}"); + joins.Add(join); + } + return joins; + } + + /// + /// 生成查询过滤条件 + /// + /// + /// + public List GetConditionalModels() + { + List wheres = new(); + foreach (VmNavigate? nav in Navigates.Values.Where(a => (a.path == MAIN_ALIES || a.navConfig.navType == eNavigateType.OneToOne) && a.wheres.Count > 0)) + { + foreach (VmWhereProp where in nav.wheres) + { + if (where.value is IEnumerable arrObj) + { + object[] val = arrObj.ToArray(); + string op = val[0].ToString()!; + switch (op) + { + case "><": + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = val[1].ToString(), ConditionalType = ConditionalType.GreaterThan, CSharpTypeName = where.csType }); + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = val[2].ToString(), ConditionalType = ConditionalType.LessThan, CSharpTypeName = where.csType }); + break; + case ">=<": + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = val[1].ToString(), ConditionalType = ConditionalType.GreaterThanOrEqual, CSharpTypeName = where.csType }); + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = val[2].ToString(), ConditionalType = ConditionalType.LessThan, CSharpTypeName = where.csType }); + break; + case "><=": + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = val[1].ToString(), ConditionalType = ConditionalType.GreaterThan, CSharpTypeName = where.csType }); + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = val[2].ToString(), ConditionalType = ConditionalType.LessThanOrEqual, CSharpTypeName = where.csType }); + break; + case ">=<=": + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = val[1].ToString(), ConditionalType = ConditionalType.GreaterThanOrEqual, CSharpTypeName = where.csType }); + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = val[2].ToString(), ConditionalType = ConditionalType.LessThanOrEqual, CSharpTypeName = where.csType }); + break; + case "in": + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = string.Join(',', val.Skip(1)), ConditionalType = ConditionalType.In, CSharpTypeName = where.csType }); + break; + default: op = string.Empty; break; + } + } + else + { + ConditionalType conditionalType = ConditionalType.Equal; + string? value = where.value?.ToString(); + if (string.IsNullOrEmpty(value)) + { + continue; + } + + if (value.Length >= 2) + { + string op = value[..2]; + switch (op) + { + case "%%": conditionalType = ConditionalType.Like; break; + case ">>": conditionalType = ConditionalType.GreaterThan; break; + case "<<": conditionalType = ConditionalType.LessThan; break; + case ">=": conditionalType = ConditionalType.GreaterThanOrEqual; break; + case "<=": conditionalType = ConditionalType.LessThanOrEqual; break; + case "==": conditionalType = ConditionalType.Equal; break; + default: op = string.Empty; break; + } + if (!string.IsNullOrEmpty(op)) + { + value = value.RemovePreFix(op); + if (value.ToLower() == "null") + { + value = null; + } + } + } + wheres.Add(new ConditionalModel { FieldName = where.fieldName, FieldValue = value, ConditionalType = conditionalType, CSharpTypeName = where.csType }); + } + } + } + return wheres; + } + + /// + /// 生成按关键字查询的条件列表 + /// + /// 是否钻取子表关键词查询 + /// + public ConditionalCollections GetKeywordConditional(bool drill = true) + { + ConditionalCollections conditionals = new() { ConditionalList = new List>() }; + if (string.IsNullOrWhiteSpace(_input.k)) + { + return conditionals; + } + + WhereType wType = WhereType.And; + IEnumerable navs = Navigates.Values.WhereIF(!drill, a => a.path == MAIN_ALIES).Where(a => a.navConfig.navType != eNavigateType.OneToMany); + foreach (VmNavigate? nav in navs) + { + foreach (VmSelectProp? prop in nav.selects.Where(a => a.fuzzy)) + { + conditionals.ConditionalList.Add(new(wType, new ConditionalModel() { FieldName = prop.fieldName, ConditionalType = ConditionalType.Like, FieldValue = _input.k, CSharpTypeName = prop.csType })); + wType = WhereType.Or; + } + } + return conditionals; + } + + /// + /// 生成排序条件列表 + /// + /// + public List GetOrderByModels() + { + IEnumerable navs = Navigates.Values.Where(a => a.orders.Count > 0); + return navs.SelectMany(a => + { + return a.orders.Select(b => new OrderByModel + { + FieldName = b.fieldName, + OrderByType = b.orderType + }); + }).ToList(); + } + + /// + /// 生成查询字段列表 + /// + /// + /// + public List GetSelectModels() + { + IEnumerable navs = Navigates.Values.Where(a => (a.path == MAIN_ALIES || a.navConfig.navType == eNavigateType.OneToOne) && a.selects.Count > 0); + return navs.SelectMany(a => + { + return a.selects.Select(b => new SelectModel + { + FiledName = b.fieldName, + AsName = (a.path == MAIN_ALIES ? "" : a.pathCode + PROP_SEPERATE) + b.code + }); + }).ToList(); + } + +} + +internal class VmNavigate +{ + public VmNavigate? parent { get; set; } + public VmNavProp navConfig { get; set; } = new VmNavProp(); + public string path { get; set; } + public string pathCode { get; set; } + + public List selects { get; set; } = new List(); + public List wheres { get; set; } = new List(); + public List orders { get; set; } = new List(); + + public VmNavigate(string vmPath) + { + path = vmPath; + pathCode = vmPath.Replace(VmQueryParser.NAVI_SEPERATE, VmQueryParser.PROP_SEPERATE); + } + /// + /// 处理占位符星号 + /// + public void HandleStar() + { + if (selects.Any(a => a.code == "*")) + { + selects.Clear(); + navConfig.naviModel!.dbProps.ForEach(a => + { + selects.Add(new VmSelectProp(a.code)); + }); + } + } + /// + /// 将属性名转换为字段名 + /// + public void LoadDbProp() + { + foreach (VmSelectProp item in selects) + { + VmDbProp? prop = navConfig.naviModel!.GetDbProp(item.code); + ThrowIf.IsNull(prop, $"输出参数{path}.{item.code}错误: 在模型{navConfig.naviModel.fullCode}中找不到属性({item.code})对应的字段"); + item.field = prop.field; + item.fieldName = pathCode + "." + item.field; + item.fuzzy = prop.fuzzy; + item.csType = prop.csType; + item.asName = (path == VmQueryParser.MAIN_ALIES ? "" : pathCode + VmQueryParser.PROP_SEPERATE) + item.code; + } + foreach (VmOrderProp item in orders) + { + VmDbProp? prop = navConfig.naviModel!.GetDbProp(item.code); + ThrowIf.IsNull(prop, $"排序参数{path}.{item.code}错误: 在模型{navConfig.naviModel.fullCode}中找不到属性({item.code})对应的字段"); + item.field = prop.field; + item.fieldName = pathCode + "." + item.field; + } + foreach (VmWhereProp item in wheres) + { + VmDbProp? prop = navConfig.naviModel!.GetDbProp(item.code); + ThrowIf.IsNull(prop, $"查询参数{path}.{item.code}错误: 在模型{navConfig.naviModel.fullCode}中找不到属性({item.code})对应的字段"); + item.field = prop.field; + item.fieldName = pathCode + "." + item.field; + item.csType = prop.csType; + } + //props.RemoveAll(a => string.IsNullOrEmpty(a.field)); } } + +internal class VmQueryBaseProp +{ + public string code { get; set; } + public string field { get; set; } = string.Empty; + public string fieldName { get; set; } = string.Empty; + + public VmQueryBaseProp(string code) + { + this.code = code; + } + +} + +internal class VmSelectProp : VmQueryBaseProp +{ + public string asName { get; set; } = string.Empty; + public string csType { get; set; } = "string"; + public bool fuzzy { get; set; } + + public VmSelectProp(string code) : base(code) + { + } +} + +internal class VmOrderProp : VmQueryBaseProp +{ + public OrderByType orderType { get; set; } = OrderByType.Asc; + + public VmOrderProp(string code) : base(code) + { + } +} + +internal class VmWhereProp : VmQueryBaseProp +{ + public string csType { get; set; } = "string"; + [AllowNull] + public object value { get; set; } + + public VmWhereProp(string code) : base(code) + { + } +} + diff --git a/visualdev/Tnb.Vengine/Domain/Vmodel.cs b/visualdev/Tnb.Vengine/Domain/Vmodel.cs index 23198e81..fbc255fe 100644 --- a/visualdev/Tnb.Vengine/Domain/Vmodel.cs +++ b/visualdev/Tnb.Vengine/Domain/Vmodel.cs @@ -23,8 +23,6 @@ namespace Tnb.Vengine.Domain; [SugarTable("sys_vmodel")] public partial class Vmodel : Entity { - public const string MAIN_ALIES = "m"; - #region Properties /// @@ -139,9 +137,6 @@ public partial class Vmodel : Entity public string fullCode { get { return areaCode + "/" + vmCode; } } - [SugarColumn(IsIgnore = true)] - public Vmodel? parent { get; set; } - /// /// 主键 /// @@ -151,8 +146,8 @@ public partial class Vmodel : Entity } #endregion Properties - //private Dictionary? _mapField2Prop = null; - //private Dictionary? _mapProp2Field = null; + + private Dictionary? _mapProps = null; /// /// 通过实体创建模型 /// @@ -207,43 +202,13 @@ public partial class Vmodel : Entity /// /// /// - public string? PropCodeToFieldCode(string propCode) + public string? PropToFieldCode(string propCode) { - return dbProps.Where(a => a.code == propCode).Select(a => a.field).FirstOrDefault(); - } - - /// - /// 根据字段名获取属性名 - /// - /// - /// - public string? FieldCodeToPropCode(string fieldCode) - { - return dbProps.Where(a => a.field == fieldCode).Select(a => a.code).FirstOrDefault(); - } - - /// - /// 属性代码转换为字段代码 - /// - /// - /// - /// - public DObject PropToField(DObject input, bool ignoreNotMapped = true) - { - DObject ret = new(); - foreach (var item in input) + if(_mapProps == null) { - var fcode = PropCodeToFieldCode(item.Key); - if (!string.IsNullOrEmpty(fcode)) - { - ret.Add(fcode, item.Value); - } - else if (!ignoreNotMapped) - { - ret.Add(item.Key, item.Value); - } + _mapProps = dbProps.ToDictionary(a=>a.code); } - return ret; + return _mapProps.GetOrDefault(propCode)?.field; } /// @@ -252,214 +217,13 @@ public partial class Vmodel : Entity /// /// /// - public DObject FieldToProp(DObject input, bool ignoreNotMapped = true) + public VmDbProp? GetDbProp(string propCode) { - DObject ret = new(); - foreach (var item in input) + if (_mapProps == null) { - var pcode = FieldCodeToPropCode(item.Key); - if (!string.IsNullOrEmpty(pcode)) - { - ret.Add(pcode, item.Value); - } - else if (!ignoreNotMapped) - { - ret.Add(item.Key, item.Value); - } + _mapProps = dbProps.ToDictionary(a => a.code); } - return ret; - } - - /// - /// 获取查询字段的属性信息 - /// - /// - /// - public List GetVmSelectProps(string? outputProps) - { - if (string.IsNullOrEmpty(outputProps) || outputProps == "*") - { - return dbProps.Select(a => new VmSelectProp { code = a.code, field = a.field }).ToList(); - } - List selProps = new(); - var outputs = outputProps.Split(',').Distinct().ToList(); - foreach (var propCode in outputs) - { - if (!propCode.Contains(".")) - { - var fieldCode = PropCodeToFieldCode(propCode); - if (!string.IsNullOrEmpty(fieldCode)) - { - selProps.Add(new VmSelectProp { code = propCode, field = fieldCode }); - } - continue; - } - var codes = propCode.Split('.'); - if (codes.Length != 2) continue; - if (codes[0] == VmSelectProp.MAIN_ALIES) - { - var fieldCode = PropCodeToFieldCode(propCode); - if (!string.IsNullOrEmpty(fieldCode)) - { - selProps.Add(new VmSelectProp { code = propCode, field = fieldCode }); - } - continue; - } - var navProp = navProps.FirstOrDefault(a => a.code == codes[0]); - if (navProp?.naviModel != null) - { - var fieldCode = navProp.naviModel.PropCodeToFieldCode(codes[1]); - if (!string.IsNullOrEmpty(fieldCode)) - { - selProps.Add(new VmSelectProp { code = codes[1], field = fieldCode, navCode = codes[0], propType = ePropType.Navigate, navType = navProp.navType }); - } - } - } - return selProps; - } - - /// - /// 获取联表配置信息 - /// - /// - /// - public List GetJoinInfos(List selProps) - { - var navigates = selProps.Where(a => a.propType == ePropType.Navigate).Select(a => a.navCode).Distinct().ToList(); - List joins = new(); - foreach (var navCode in navigates) - { - if (navCode == VmSelectProp.MAIN_ALIES) continue; - var navProp = navProps.First(a => a.code == navCode); - if (navProp.naviModel == null || navProp.navType != eNavigateType.OneToOne) continue; - JoinInfoParameter join = new JoinInfoParameter { TableName = navProp.naviModel.tableName, ShortName = navCode, Type = JoinType.Left }; - var fkField = navProp.naviModel.PropCodeToFieldCode(navProp.fkField); - var refField = navProp.refField; - if (navProp.refCode != VmSelectProp.MAIN_ALIES) - { - var refProp = navProps.First(a => a.code == navProp.refCode); - refField = refProp.naviModel!.PropCodeToFieldCode(navProp.refField); - } - join.Models = ObjectFuncModel.Create("Equals", $"{navCode}.{fkField}", $"{navProp.refCode}.{refField}"); - joins.Add(join); - } - return joins; - } - - /// - /// 转换为查询过滤条件 - /// - /// - /// - public List GetConditionalModels(DObject? filter) - { - List wheres = new List(); - if (filter == null) return wheres; - foreach (var item in filter) - { - VmDbProp? prop = null; - // TODO 按子表条件查询 - if (item.Key.Contains(".")) - { - var codes = item.Key.Split('.'); - if (codes.Length >= 2) - { - var navProp = navProps.FirstOrDefault(a => a.code == codes[0]); - if (navProp != null && navProp.naviModel != null) - { - var dbProp = navProp.naviModel.dbProps.FirstOrDefault(a => a.code == codes[1]); - if (dbProp != null) - { - prop = new VmDbProp(); - prop.field = codes[0] + "." + dbProp.field; - prop.csType = dbProp.csType; - } - } - } - } - else - { - prop = dbProps.FirstOrDefault(a => a.code == item.Key); - } - if (prop == null) continue; - if (item.Value is JArray val) - { - var op = val[0].ToString(); - switch (op) - { - case "><": - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = val[1].ToString(), ConditionalType = ConditionalType.GreaterThan, CSharpTypeName = prop.csType }); - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = val[2].ToString(), ConditionalType = ConditionalType.LessThan, CSharpTypeName = prop.csType }); - break; - - case ">=<": - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = val[1].ToString(), ConditionalType = ConditionalType.GreaterThanOrEqual, CSharpTypeName = prop.csType }); - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = val[2].ToString(), ConditionalType = ConditionalType.LessThan, CSharpTypeName = prop.csType }); - break; - - case "><=": - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = val[1].ToString(), ConditionalType = ConditionalType.GreaterThan, CSharpTypeName = prop.csType }); - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = val[2].ToString(), ConditionalType = ConditionalType.LessThanOrEqual, CSharpTypeName = prop.csType }); - break; - - case ">=<=": - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = val[1].ToString(), ConditionalType = ConditionalType.GreaterThanOrEqual, CSharpTypeName = prop.csType }); - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = val[2].ToString(), ConditionalType = ConditionalType.LessThanOrEqual, CSharpTypeName = prop.csType }); - break; - - case "in": - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = val.Skip(1).ToString(), ConditionalType = ConditionalType.In, CSharpTypeName = prop.csType }); - break; - - default: op = string.Empty; break; - } - } - else - { - //if (item.Value == null) continue; - var conditionalType = ConditionalType.Equal; - string? value = item.Value?.ToString(); - if (string.IsNullOrEmpty(value)) continue; - if (value.Length >= 2) - { - var op = value.Substring(0, 2); - switch (op) - { - case "%%": conditionalType = ConditionalType.Like; break; - case ">>": conditionalType = ConditionalType.GreaterThan; break; - case "<<": conditionalType = ConditionalType.LessThan; break; - case ">=": conditionalType = ConditionalType.GreaterThanOrEqual; break; - case "<=": conditionalType = ConditionalType.LessThanOrEqual; break; - case "==": conditionalType = ConditionalType.Equal; break; - default: op = string.Empty; break; - } - if (!string.IsNullOrEmpty(op)) - { - value = value.RemovePreFix(op); - if (value.ToLower() == "null") - { - value = null; - } - } - } - wheres.Add(new ConditionalModel { FieldName = prop.field, FieldValue = value, ConditionalType = conditionalType, CSharpTypeName = prop.csType }); - } - } - return wheres; - } - - /// - /// 转换为查询字段列表 - /// - /// - /// - public List GetSelectModels(List selProps) - { - return selProps.Where(a => a.navType != eNavigateType.OneToMany && a.navType != eNavigateType.ManyToMany).Select(a => new SelectModel - { - FiledName = a.navCode + "." + a.field, - AsName = (a.navCode == VmSelectProp.MAIN_ALIES ? "" : a.navCode + "_") + a.code - }).ToList(); + return _mapProps.GetOrDefault(propCode); } /// diff --git a/visualdev/Tnb.Vengine/Mapper/VmodelMapper.cs b/visualdev/Tnb.Vengine/Mapper/VmodelMapper.cs index ed621466..e2442008 100644 --- a/visualdev/Tnb.Vengine/Mapper/VmodelMapper.cs +++ b/visualdev/Tnb.Vengine/Mapper/VmodelMapper.cs @@ -15,11 +15,11 @@ public class VmodelMapper : IRegister { public void Register(TypeAdapterConfig config) { - config.ForType() + config.ForType() .Map(dest => dest.psize, src => 1) .Map(dest => dest.pnum, src => 0) .Map(dest => dest.q, src => string.IsNullOrEmpty(src.q) ? null : src.q.ToObject()); - config.ForType() + config.ForType() .Map(dest => dest.q, src => string.IsNullOrEmpty(src.q) ? null : src.q.ToObject()); config.ForType() .Map(dest => dest.code, src => src.DbColumnName.ToCamel())