diff --git a/netcore/src/Modularity/Common/NCC.Common/Enum/CommonStatus.cs b/netcore/src/Modularity/Common/NCC.Common/Enum/CommonStatus.cs
deleted file mode 100644
index 315cdbc..0000000
--- a/netcore/src/Modularity/Common/NCC.Common/Enum/CommonStatus.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using NCC.Dependency;
-using System.ComponentModel;
-
-namespace NCC.Common.Enum
-{
- ///
- /// 公共状态
- ///
- [SuppressSniffer]
- public enum CommonStatus
- {
- ///
- /// 正常
- ///
- [Description("正常")]
- ENABLE = 0,
-
- ///
- /// 停用
- ///
- [Description("停用")]
- DISABLE = 1,
-
- ///
- /// 删除
- ///
- [Description("删除")]
- DELETED = 2
- }
-}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryCrInput.cs
new file mode 100644
index 0000000..351665e
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryCrInput.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqInventory
+{
+ ///
+ /// 库存创建输入
+ ///
+ public class LqInventoryCrInput
+ {
+ ///
+ /// 产品名称
+ ///
+ [Required(ErrorMessage = "产品名称不能为空")]
+ [StringLength(100, ErrorMessage = "产品名称长度不能超过100个字符")]
+ [Display(Name = "产品名称")]
+ public string ProductName { get; set; }
+
+ ///
+ /// 价格
+ ///
+ [Required(ErrorMessage = "价格不能为空")]
+ [Range(0, double.MaxValue, ErrorMessage = "价格不能小于0")]
+ [Display(Name = "价格")]
+ public decimal Price { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [Range(0, int.MaxValue, ErrorMessage = "数量不能小于0")]
+ [Display(Name = "数量")]
+ public int Quantity { get; set; } = 0;
+
+ ///
+ /// 产品类别
+ ///
+ [Required(ErrorMessage = "产品类别不能为空")]
+ [StringLength(50, ErrorMessage = "产品类别长度不能超过50个字符")]
+ [Display(Name = "产品类别")]
+ public string ProductCategory { get; set; }
+
+ ///
+ /// 归属部门ID
+ ///
+ [Required(ErrorMessage = "归属部门ID不能为空")]
+ [StringLength(50, ErrorMessage = "归属部门ID长度不能超过50个字符")]
+ [Display(Name = "归属部门ID")]
+ public string DepartmentId { get; set; }
+
+ ///
+ /// 标准单位
+ ///
+ [Required(ErrorMessage = "标准单位不能为空")]
+ [StringLength(20, ErrorMessage = "标准单位长度不能超过20个字符")]
+ [Display(Name = "标准单位")]
+ public string StandardUnit { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryInfoOutput.cs
new file mode 100644
index 0000000..f7c7185
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryInfoOutput.cs
@@ -0,0 +1,14 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqInventory
+{
+ ///
+ /// 库存详情输出
+ ///
+ public class LqInventoryInfoOutput : LqInventoryListOutput
+ {
+ // 继承自LqInventoryListOutput,包含所有列表输出字段
+ // 可以根据需要添加额外的详情字段
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryListOutput.cs
new file mode 100644
index 0000000..5edfb11
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryListOutput.cs
@@ -0,0 +1,107 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqInventory
+{
+ ///
+ /// 库存列表输出
+ ///
+ public class LqInventoryListOutput
+ {
+ ///
+ /// 库存ID
+ ///
+ [Display(Name = "库存ID")]
+ public string id { get; set; }
+
+ ///
+ /// 产品名称
+ ///
+ [Display(Name = "产品名称")]
+ public string productName { get; set; }
+
+ ///
+ /// 价格
+ ///
+ [Display(Name = "价格")]
+ public decimal price { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ public int quantity { get; set; }
+
+ ///
+ /// 产品类别
+ ///
+ [Display(Name = "产品类别")]
+ public string productCategory { get; set; }
+
+ ///
+ /// 归属部门ID
+ ///
+ [Display(Name = "归属部门ID")]
+ public string departmentId { get; set; }
+
+ ///
+ /// 部门名称
+ ///
+ [Display(Name = "部门名称")]
+ public string departmentName { get; set; }
+
+ ///
+ /// 标准单位
+ ///
+ [Display(Name = "标准单位")]
+ public string standardUnit { get; set; }
+
+ ///
+ /// 总价值
+ ///
+ [Display(Name = "总价值")]
+ public decimal totalValue { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ [Display(Name = "创建人ID")]
+ public string createUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ [Display(Name = "创建人姓名")]
+ public string createUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Display(Name = "创建时间")]
+ public DateTime createTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ [Display(Name = "更新人ID")]
+ public string updateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ [Display(Name = "更新人姓名")]
+ public string updateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [Display(Name = "更新时间")]
+ public DateTime? updateTime { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ [Display(Name = "是否有效")]
+ public int isEffective { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryListQueryInput.cs
new file mode 100644
index 0000000..1650106
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryListQueryInput.cs
@@ -0,0 +1,60 @@
+using NCC.Common.Filter;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqInventory
+{
+ ///
+ /// 库存列表查询输入
+ ///
+ public class LqInventoryListQueryInput : PageInputBase
+ {
+ ///
+ /// 产品名称
+ ///
+ [Display(Name = "产品名称", Description = "根据产品名称筛选")]
+ public string ProductName { get; set; }
+
+ ///
+ /// 产品类别
+ ///
+ [Display(Name = "产品类别", Description = "根据产品类别筛选")]
+ public string ProductCategory { get; set; }
+
+ ///
+ /// 归属部门ID
+ ///
+ [Display(Name = "归属部门ID", Description = "根据归属部门ID筛选")]
+ public string DepartmentId { get; set; }
+
+ ///
+ /// 价格最小值
+ ///
+ [Display(Name = "价格最小值", Description = "价格范围的最小值")]
+ public decimal? PriceMin { get; set; }
+
+ ///
+ /// 价格最大值
+ ///
+ [Display(Name = "价格最大值", Description = "价格范围的最大值")]
+ public decimal? PriceMax { get; set; }
+
+ ///
+ /// 数量最小值
+ ///
+ [Display(Name = "数量最小值", Description = "数量范围的最小值")]
+ public int? QuantityMin { get; set; }
+
+ ///
+ /// 数量最大值
+ ///
+ [Display(Name = "数量最大值", Description = "数量范围的最大值")]
+ public int? QuantityMax { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ [Display(Name = "是否有效", Description = "根据是否有效筛选")]
+ public int? IsEffective { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryUpInput.cs
new file mode 100644
index 0000000..d6184e7
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryUpInput.cs
@@ -0,0 +1,19 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqInventory
+{
+ ///
+ /// 库存更新输入
+ ///
+ public class LqInventoryUpInput : LqInventoryCrInput
+ {
+ ///
+ /// 库存ID
+ ///
+ [Required(ErrorMessage = "库存ID不能为空")]
+ [StringLength(50, ErrorMessage = "库存ID长度不能超过50个字符")]
+ [Display(Name = "库存ID")]
+ public string Id { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageCrInput.cs
new file mode 100644
index 0000000..c976f18
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageCrInput.cs
@@ -0,0 +1,49 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqInventoryUsage
+{
+ ///
+ /// 库存使用记录创建输入
+ ///
+ public class LqInventoryUsageCrInput
+ {
+ ///
+ /// 产品ID
+ ///
+ [Required(ErrorMessage = "产品ID不能为空")]
+ [StringLength(50, ErrorMessage = "产品ID长度不能超过50个字符")]
+ [Display(Name = "产品ID")]
+ public string ProductId { get; set; }
+
+ ///
+ /// 门店ID
+ ///
+ [Required(ErrorMessage = "门店ID不能为空")]
+ [StringLength(50, ErrorMessage = "门店ID长度不能超过50个字符")]
+ [Display(Name = "门店ID")]
+ public string StoreId { get; set; }
+
+ ///
+ /// 使用时间
+ ///
+ [Required(ErrorMessage = "使用时间不能为空")]
+ [Display(Name = "使用时间")]
+ public DateTime UsageTime { get; set; }
+
+ ///
+ /// 使用数量
+ ///
+ [Required(ErrorMessage = "使用数量不能为空")]
+ [Range(1, int.MaxValue, ErrorMessage = "使用数量必须大于0")]
+ [Display(Name = "使用数量")]
+ public int UsageQuantity { get; set; }
+
+ ///
+ /// 关联消耗ID
+ ///
+ [StringLength(50, ErrorMessage = "关联消耗ID长度不能超过50个字符")]
+ [Display(Name = "关联消耗ID")]
+ public string RelatedConsumeId { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageInfoOutput.cs
new file mode 100644
index 0000000..8bae91a
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageInfoOutput.cs
@@ -0,0 +1,105 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqInventoryUsage
+{
+ ///
+ /// 库存使用记录详情输出
+ ///
+ public class LqInventoryUsageInfoOutput
+ {
+ ///
+ /// 使用记录ID
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// 产品ID
+ ///
+ public string ProductId { get; set; }
+
+ ///
+ /// 产品名称
+ ///
+ public string ProductName { get; set; }
+
+ ///
+ /// 产品类别
+ ///
+ public string ProductCategory { get; set; }
+
+ ///
+ /// 产品价格
+ ///
+ public decimal ProductPrice { get; set; }
+
+ ///
+ /// 产品标准单位
+ ///
+ public string ProductStandardUnit { get; set; }
+
+ ///
+ /// 门店ID
+ ///
+ public string StoreId { get; set; }
+
+ ///
+ /// 门店名称
+ ///
+ public string StoreName { get; set; }
+
+ ///
+ /// 使用时间
+ ///
+ public DateTime UsageTime { get; set; }
+
+ ///
+ /// 使用数量
+ ///
+ public int UsageQuantity { get; set; }
+
+ ///
+ /// 关联消耗ID
+ ///
+ public string RelatedConsumeId { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ public string CreateUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ public string UpdateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ public int IsEffective { get; set; }
+
+ ///
+ /// 使用总价值
+ ///
+ public decimal UsageTotalValue { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageListOutput.cs
new file mode 100644
index 0000000..4f30762
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageListOutput.cs
@@ -0,0 +1,100 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqInventoryUsage
+{
+ ///
+ /// 库存使用记录列表输出
+ ///
+ public class LqInventoryUsageListOutput
+ {
+ ///
+ /// 使用记录ID
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// 产品ID
+ ///
+ public string ProductId { get; set; }
+
+ ///
+ /// 产品名称
+ ///
+ public string ProductName { get; set; }
+
+ ///
+ /// 产品类别
+ ///
+ public string ProductCategory { get; set; }
+
+ ///
+ /// 产品价格
+ ///
+ public decimal ProductPrice { get; set; }
+
+ ///
+ /// 门店ID
+ ///
+ public string StoreId { get; set; }
+
+ ///
+ /// 门店名称
+ ///
+ public string StoreName { get; set; }
+
+ ///
+ /// 使用时间
+ ///
+ public DateTime UsageTime { get; set; }
+
+ ///
+ /// 使用数量
+ ///
+ public int UsageQuantity { get; set; }
+
+ ///
+ /// 关联消耗ID
+ ///
+ public string RelatedConsumeId { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ public string CreateUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ public string UpdateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ public int IsEffective { get; set; }
+
+ ///
+ /// 使用总价值
+ ///
+ public decimal UsageTotalValue { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageListQueryInput.cs
new file mode 100644
index 0000000..23e1ea3
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageListQueryInput.cs
@@ -0,0 +1,55 @@
+using NCC.Common.Filter;
+
+namespace NCC.Extend.Entitys.Dto.LqInventoryUsage
+{
+ ///
+ /// 库存使用记录列表查询输入
+ ///
+ public class LqInventoryUsageListQueryInput : PageInputBase
+ {
+ ///
+ /// 产品ID
+ ///
+ public string ProductId { get; set; }
+
+ ///
+ /// 产品名称
+ ///
+ public string ProductName { get; set; }
+
+ ///
+ /// 产品类别
+ ///
+ public string ProductCategory { get; set; }
+
+ ///
+ /// 门店ID
+ ///
+ public string StoreId { get; set; }
+
+ ///
+ /// 门店名称
+ ///
+ public string StoreName { get; set; }
+
+ ///
+ /// 使用开始时间
+ ///
+ public System.DateTime? UsageStartTime { get; set; }
+
+ ///
+ /// 使用结束时间
+ ///
+ public System.DateTime? UsageEndTime { get; set; }
+
+ ///
+ /// 关联消耗ID
+ ///
+ public string RelatedConsumeId { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ public int? IsEffective { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageStatisticsInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageStatisticsInput.cs
new file mode 100644
index 0000000..2b4f313
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageStatisticsInput.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqInventoryUsage
+{
+ ///
+ /// 库存使用记录统计查询输入
+ ///
+ public class LqInventoryUsageStatisticsInput
+ {
+ ///
+ /// 开始时间
+ ///
+ [Required(ErrorMessage = "开始时间不能为空")]
+ [Display(Name = "开始时间")]
+ public DateTime StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ [Required(ErrorMessage = "结束时间不能为空")]
+ [Display(Name = "结束时间")]
+ public DateTime EndTime { get; set; }
+
+ ///
+ /// 产品ID(可选,用于筛选特定产品)
+ ///
+ [StringLength(50, ErrorMessage = "产品ID长度不能超过50个字符")]
+ [Display(Name = "产品ID")]
+ public string ProductId { get; set; }
+
+ ///
+ /// 门店ID(可选,用于筛选特定门店)
+ ///
+ [StringLength(50, ErrorMessage = "门店ID长度不能超过50个字符")]
+ [Display(Name = "门店ID")]
+ public string StoreId { get; set; }
+
+ ///
+ /// 产品类别(可选,用于筛选特定类别)
+ ///
+ [StringLength(50, ErrorMessage = "产品类别长度不能超过50个字符")]
+ [Display(Name = "产品类别")]
+ public string ProductCategory { get; set; }
+
+ ///
+ /// 统计类型(日/周/月)
+ ///
+ [StringLength(10, ErrorMessage = "统计类型长度不能超过10个字符")]
+ [Display(Name = "统计类型")]
+ public string StatisticsType { get; set; } = "日";
+
+ ///
+ /// 排行榜数量(默认10)
+ ///
+ [Range(1, 100, ErrorMessage = "排行榜数量必须在1-100之间")]
+ [Display(Name = "排行榜数量")]
+ public int RankingCount { get; set; } = 10;
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageStatisticsOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageStatisticsOutput.cs
new file mode 100644
index 0000000..b4a269f
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageStatisticsOutput.cs
@@ -0,0 +1,163 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqInventoryUsage
+{
+ ///
+ /// 产品使用统计输出
+ ///
+ public class ProductUsageStatisticsOutput
+ {
+ ///
+ /// 产品ID
+ ///
+ public string ProductId { get; set; }
+
+ ///
+ /// 产品名称
+ ///
+ public string ProductName { get; set; }
+
+ ///
+ /// 产品类别
+ ///
+ public string ProductCategory { get; set; }
+
+ ///
+ /// 产品价格
+ ///
+ public decimal ProductPrice { get; set; }
+
+ ///
+ /// 使用总数量
+ ///
+ public int TotalUsageQuantity { get; set; }
+
+ ///
+ /// 使用总金额
+ ///
+ public decimal TotalUsageAmount { get; set; }
+
+ ///
+ /// 使用次数
+ ///
+ public int UsageCount { get; set; }
+
+ ///
+ /// 平均每次使用数量
+ ///
+ public decimal AverageUsageQuantity { get; set; }
+ }
+
+ ///
+ /// 门店使用统计输出
+ ///
+ public class StoreUsageStatisticsOutput
+ {
+ ///
+ /// 门店ID
+ ///
+ public string StoreId { get; set; }
+
+ ///
+ /// 门店名称
+ ///
+ public string StoreName { get; set; }
+
+ ///
+ /// 使用总数量
+ ///
+ public int TotalUsageQuantity { get; set; }
+
+ ///
+ /// 使用总金额
+ ///
+ public decimal TotalUsageAmount { get; set; }
+
+ ///
+ /// 使用次数
+ ///
+ public int UsageCount { get; set; }
+
+ ///
+ /// 使用产品种类数
+ ///
+ public int ProductVarietyCount { get; set; }
+ }
+
+ ///
+ /// 使用趋势统计输出
+ ///
+ public class UsageTrendStatisticsOutput
+ {
+ ///
+ /// 统计日期
+ ///
+ public DateTime StatisticsDate { get; set; }
+
+ ///
+ /// 使用总数量
+ ///
+ public int TotalUsageQuantity { get; set; }
+
+ ///
+ /// 使用总金额
+ ///
+ public decimal TotalUsageAmount { get; set; }
+
+ ///
+ /// 使用次数
+ ///
+ public int UsageCount { get; set; }
+
+ ///
+ /// 使用产品种类数
+ ///
+ public int ProductVarietyCount { get; set; }
+ }
+
+ ///
+ /// 产品使用排行榜输出
+ ///
+ public class ProductUsageRankingOutput
+ {
+ ///
+ /// 排名
+ ///
+ public int Ranking { get; set; }
+
+ ///
+ /// 产品ID
+ ///
+ public string ProductId { get; set; }
+
+ ///
+ /// 产品名称
+ ///
+ public string ProductName { get; set; }
+
+ ///
+ /// 产品类别
+ ///
+ public string ProductCategory { get; set; }
+
+ ///
+ /// 使用总数量
+ ///
+ public int TotalUsageQuantity { get; set; }
+
+ ///
+ /// 使用总金额
+ ///
+ public decimal TotalUsageAmount { get; set; }
+
+ ///
+ /// 使用次数
+ ///
+ public int UsageCount { get; set; }
+
+ ///
+ /// 使用门店数
+ ///
+ public int StoreCount { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageUpInput.cs
new file mode 100644
index 0000000..4f889fb
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageUpInput.cs
@@ -0,0 +1,19 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqInventoryUsage
+{
+ ///
+ /// 库存使用记录更新输入
+ ///
+ public class LqInventoryUsageUpInput : LqInventoryUsageCrInput
+ {
+ ///
+ /// 使用记录ID
+ ///
+ [Required(ErrorMessage = "使用记录ID不能为空")]
+ [StringLength(50, ErrorMessage = "使用记录ID长度不能超过50个字符")]
+ [Display(Name = "使用记录ID")]
+ public string Id { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/TransferCardInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/TransferCardInput.cs
new file mode 100644
index 0000000..6952310
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/TransferCardInput.cs
@@ -0,0 +1,228 @@
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqKdKdjlb
+{
+ ///
+ /// 转卡输入参数
+ ///
+ public class TransferCardInput
+ {
+ ///
+ /// 转出会员ID
+ ///
+ [Required(ErrorMessage = "转出会员ID不能为空")]
+ [StringLength(50, ErrorMessage = "转出会员ID长度不能超过50个字符")]
+ [Display(Name = "转出会员ID")]
+ public string FromMemberId { get; set; }
+
+ ///
+ /// 转入会员ID
+ ///
+ [Required(ErrorMessage = "转入会员ID不能为空")]
+ [StringLength(50, ErrorMessage = "转入会员ID长度不能超过50个字符")]
+ [Display(Name = "转入会员ID")]
+ public string ToMemberId { get; set; }
+
+ ///
+ /// 转出会员签名
+ ///
+ [Required(ErrorMessage = "传出会员签名不能为空")]
+ [StringLength(50, ErrorMessage = "传出会员签名长度不能超过50个字符")]
+ [Display(Name = "传出会员签名")]
+ public string SignatureFile { get; set; }
+
+ ///
+ /// 转出品项列表
+ ///
+ [Required(ErrorMessage = "转出品项列表不能为空")]
+ [Display(Name = "转出品项列表")]
+ public List TransferItems { get; set; }
+
+ ///
+ /// 转卡备注
+ ///
+ [StringLength(500, ErrorMessage = "转卡备注长度不能超过500个字符")]
+ [Display(Name = "转卡备注")]
+ public string Remarks { get; set; }
+
+
+
+ ///
+ /// 门店ID
+ ///
+ [Required(ErrorMessage = "门店ID不能为空")]
+ [StringLength(50, ErrorMessage = "门店ID长度不能超过50个字符")]
+ [Display(Name = "门店ID")]
+ public string StoreId { get; set; }
+ }
+
+ ///
+ /// 转卡品项输入参数
+ ///
+ public class TransferItemInput
+ {
+ ///
+ /// 开单品项明细ID
+ ///
+ [Required(ErrorMessage = "开单品项明细ID不能为空")]
+ [StringLength(50, ErrorMessage = "开单品项明细ID长度不能超过50个字符")]
+ [Display(Name = "开单品项明细ID")]
+ public string BillingItemId { get; set; }
+
+ ///
+ /// 转出数量
+ ///
+ [Required(ErrorMessage = "转出数量不能为空")]
+ [Range(1, int.MaxValue, ErrorMessage = "转出数量必须大于0")]
+ [Display(Name = "转出数量")]
+ public int TransferQuantity { get; set; }
+
+ ///
+ /// 品项ID
+ ///
+ [Required(ErrorMessage = "品项ID不能为空")]
+ [StringLength(50, ErrorMessage = "品项ID长度不能超过50个字符")]
+ [Display(Name = "品项ID")]
+ public string ItemId { get; set; }
+
+ ///
+ /// 品项名称
+ ///
+ [Required(ErrorMessage = "品项名称不能为空")]
+ [StringLength(100, ErrorMessage = "品项名称长度不能超过100个字符")]
+ [Display(Name = "品项名称")]
+ public string ItemName { get; set; }
+
+ ///
+ /// 品项价格
+ ///
+ [Required(ErrorMessage = "品项价格不能为空")]
+ [Range(0, double.MaxValue, ErrorMessage = "品项价格不能为负数")]
+ [Display(Name = "品项价格")]
+ public decimal ItemPrice { get; set; }
+
+ ///
+ /// 来源类型
+ ///
+ [StringLength(50, ErrorMessage = "来源类型长度不能超过50个字符")]
+ [Display(Name = "来源类型")]
+ public string SourceType { get; set; } = "转卡";
+
+ ///
+ /// 健康师业绩列表
+ ///
+ [Display(Name = "健康师业绩列表")]
+ public List HealthTeacherPerformances { get; set; }
+
+ ///
+ /// 科技部老师业绩列表
+ ///
+ [Display(Name = "科技部老师业绩列表")]
+ public List TechTeacherPerformances { get; set; }
+ }
+
+ ///
+ /// 转卡健康师业绩输入参数
+ ///
+ public class TransferHealthTeacherPerformanceInput
+ {
+ ///
+ /// 健康师ID
+ ///
+ [Required(ErrorMessage = "健康师ID不能为空")]
+ [StringLength(50, ErrorMessage = "健康师ID长度不能超过50个字符")]
+ [Display(Name = "健康师ID")]
+ public string HealthTeacherId { get; set; }
+
+ ///
+ /// 健康师姓名
+ ///
+ [Required(ErrorMessage = "健康师姓名不能为空")]
+ [StringLength(50, ErrorMessage = "健康师姓名长度不能超过50个字符")]
+ [Display(Name = "健康师姓名")]
+ public string HealthTeacherName { get; set; }
+
+ ///
+ /// 健康师账号
+ ///
+ [StringLength(50, ErrorMessage = "健康师账号长度不能超过50个字符")]
+ [Display(Name = "健康师账号")]
+ public string HealthTeacherAccount { get; set; }
+
+ ///
+ /// 业绩金额
+ ///
+ [Required(ErrorMessage = "业绩金额不能为空")]
+ [Range(0, double.MaxValue, ErrorMessage = "业绩金额不能为负数")]
+ [Display(Name = "业绩金额")]
+ public decimal PerformanceAmount { get; set; }
+
+ ///
+ /// 人工成本
+ ///
+ [Range(0, double.MaxValue, ErrorMessage = "人工成本不能为负数")]
+ [Display(Name = "人工成本")]
+ public decimal LaborCost { get; set; }
+
+ ///
+ /// 品项数量
+ ///
+ [Required(ErrorMessage = "品项数量不能为空")]
+ [Range(1, int.MaxValue, ErrorMessage = "品项数量必须大于0")]
+ [Display(Name = "品项数量")]
+ public int ItemQuantity { get; set; }
+ }
+
+ ///
+ /// 转卡科技部老师业绩输入参数
+ ///
+ public class TransferTechTeacherPerformanceInput
+ {
+ ///
+ /// 科技部老师ID
+ ///
+ [Required(ErrorMessage = "科技部老师ID不能为空")]
+ [StringLength(50, ErrorMessage = "科技部老师ID长度不能超过50个字符")]
+ [Display(Name = "科技部老师ID")]
+ public string TechTeacherId { get; set; }
+
+ ///
+ /// 科技部老师姓名
+ ///
+ [Required(ErrorMessage = "科技部老师姓名不能为空")]
+ [StringLength(50, ErrorMessage = "科技部老师姓名长度不能超过50个字符")]
+ [Display(Name = "科技部老师姓名")]
+ public string TechTeacherName { get; set; }
+
+ ///
+ /// 科技部老师账号
+ ///
+ [StringLength(50, ErrorMessage = "科技部老师账号长度不能超过50个字符")]
+ [Display(Name = "科技部老师账号")]
+ public string TechTeacherAccount { get; set; }
+
+ ///
+ /// 业绩金额
+ ///
+ [Required(ErrorMessage = "业绩金额不能为空")]
+ [Range(0, double.MaxValue, ErrorMessage = "业绩金额不能为负数")]
+ [Display(Name = "业绩金额")]
+ public decimal PerformanceAmount { get; set; }
+
+ ///
+ /// 人工成本
+ ///
+ [Range(0, double.MaxValue, ErrorMessage = "人工成本不能为负数")]
+ [Display(Name = "人工成本")]
+ public decimal LaborCost { get; set; }
+
+ ///
+ /// 品项数量
+ ///
+ [Required(ErrorMessage = "品项数量不能为空")]
+ [Range(1, int.MaxValue, ErrorMessage = "品项数量必须大于0")]
+ [Display(Name = "品项数量")]
+ public int ItemQuantity { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/TransferCardOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/TransferCardOutput.cs
new file mode 100644
index 0000000..e4aedce
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/TransferCardOutput.cs
@@ -0,0 +1,60 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqKdKdjlb
+{
+ ///
+ /// 转卡输出参数
+ ///
+ public class TransferCardOutput
+ {
+ ///
+ /// 转卡是否成功
+ ///
+ public bool Success { get; set; }
+
+ ///
+ /// 转卡记录ID(退卡记录ID)
+ ///
+ public string TransferId { get; set; }
+
+ ///
+ /// 退卡记录ID
+ ///
+ public string RefundId { get; set; }
+
+ ///
+ /// 开卡记录ID
+ ///
+ public string BillingId { get; set; }
+
+ ///
+ /// 转卡总金额
+ ///
+ public decimal TotalAmount { get; set; }
+
+ ///
+ /// 转卡品项数量
+ ///
+ public int TotalQuantity { get; set; }
+
+ ///
+ /// 转出会员姓名
+ ///
+ public string FromMemberName { get; set; }
+
+ ///
+ /// 转入会员姓名
+ ///
+ public string ToMemberName { get; set; }
+
+ ///
+ /// 转卡时间
+ ///
+ public DateTime TransferTime { get; set; }
+
+ ///
+ /// 消息
+ ///
+ public string Message { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassAddStudentsInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassAddStudentsInput.cs
new file mode 100644
index 0000000..8546b91
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassAddStudentsInput.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 向学习班级添加学员输入
+ ///
+ public class LqStudyClassAddStudentsInput
+ {
+ ///
+ /// 班级ID
+ ///
+ [Required(ErrorMessage = "班级ID不能为空")]
+ [StringLength(50, ErrorMessage = "班级ID长度不能超过50个字符")]
+ [Display(Name = "班级ID")]
+ public string ClassId { get; set; }
+
+ ///
+ ///
+ [Required(ErrorMessage = "学员列表不能为空")]
+ [Display(Name = "学员列表")]
+ public List Students { get; set; } = new List();
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassCrInput.cs
new file mode 100644
index 0000000..4ed5c43
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassCrInput.cs
@@ -0,0 +1,48 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 学习班级创建输入
+ ///
+ public class LqStudyClassCrInput
+ {
+ ///
+ /// 班级名称
+ ///
+ [Required(ErrorMessage = "班级名称不能为空")]
+ [StringLength(100, ErrorMessage = "班级名称长度不能超过100个字符")]
+ [Display(Name = "班级名称")]
+ public string ClassName { get; set; }
+
+ ///
+ /// 任教老师ID
+ ///
+ [Required(ErrorMessage = "任教老师ID不能为空")]
+ [StringLength(50, ErrorMessage = "任教老师ID长度不能超过50个字符")]
+ [Display(Name = "任教老师ID")]
+ public string TeacherId { get; set; }
+
+ ///
+ /// 开始时间
+ ///
+ [Required(ErrorMessage = "开始时间不能为空")]
+ [Display(Name = "开始时间")]
+ public DateTime StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ [Required(ErrorMessage = "结束时间不能为空")]
+ [Display(Name = "结束时间")]
+ public DateTime EndTime { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [StringLength(500, ErrorMessage = "备注长度不能超过500个字符")]
+ [Display(Name = "备注")]
+ public string Remark { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassCreateWithStudentsInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassCreateWithStudentsInput.cs
new file mode 100644
index 0000000..bc8f0bc
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassCreateWithStudentsInput.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 创建学习班级并添加学员输入
+ ///
+ public class LqStudyClassCreateWithStudentsInput
+ {
+ ///
+ /// 班级名称
+ ///
+ [Required(ErrorMessage = "班级名称不能为空")]
+ [StringLength(100, ErrorMessage = "班级名称长度不能超过100个字符")]
+ [Display(Name = "班级名称")]
+ public string ClassName { get; set; }
+
+ ///
+ /// 任教老师ID
+ ///
+ [Required(ErrorMessage = "任教老师ID不能为空")]
+ [StringLength(50, ErrorMessage = "任教老师ID长度不能超过50个字符")]
+ [Display(Name = "任教老师ID")]
+ public string TeacherId { get; set; }
+
+ ///
+ /// 开始时间
+ ///
+ [Required(ErrorMessage = "开始时间不能为空")]
+ [Display(Name = "开始时间")]
+ public DateTime StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ [Required(ErrorMessage = "结束时间不能为空")]
+ [Display(Name = "结束时间")]
+ public DateTime EndTime { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [StringLength(500, ErrorMessage = "备注长度不能超过500个字符")]
+ [Display(Name = "备注")]
+ public string Remark { get; set; }
+
+ ///
+ /// 学员列表
+ ///
+ [Display(Name = "学员列表")]
+ public List Students { get; set; } = new List();
+ }
+
+ ///
+ /// 学员创建输入
+ ///
+ public class LqStudyStudentCreateInput
+ {
+ ///
+ /// 员工姓名
+ ///
+ [Required(ErrorMessage = "员工姓名不能为空")]
+ [StringLength(50, ErrorMessage = "员工姓名长度不能超过50个字符")]
+ [Display(Name = "员工姓名")]
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工电话
+ ///
+ [Required(ErrorMessage = "员工电话不能为空")]
+ [StringLength(20, ErrorMessage = "员工电话长度不能超过20个字符")]
+ [Display(Name = "员工电话")]
+ public string EmployeePhone { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [Required(ErrorMessage = "员工ID不能为空")]
+ [StringLength(50, ErrorMessage = "员工ID长度不能超过50个字符")]
+ [Display(Name = "员工ID")]
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 入院时间
+ ///
+ [Required(ErrorMessage = "入院时间不能为空")]
+ [Display(Name = "入院时间")]
+ public DateTime AdmissionTime { get; set; }
+
+ ///
+ /// HR归属
+ ///
+ [StringLength(50, ErrorMessage = "HR归属长度不能超过50个字符")]
+ [Display(Name = "HR归属")]
+ public string HrBelong { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassInfoOutput.cs
new file mode 100644
index 0000000..94a610b
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassInfoOutput.cs
@@ -0,0 +1,95 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 学习班级详情输出
+ ///
+ public class LqStudyClassInfoOutput
+ {
+ ///
+ /// 班级ID
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// 班级名称
+ ///
+ public string ClassName { get; set; }
+
+ ///
+ /// 任教老师ID
+ ///
+ public string TeacherId { get; set; }
+
+ ///
+ /// 任教老师姓名
+ ///
+ public string TeacherName { get; set; }
+
+ ///
+ /// 任教老师电话
+ ///
+ public string TeacherPhone { get; set; }
+
+ ///
+ /// 开始时间
+ ///
+ public DateTime StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ public DateTime EndTime { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ public string CreateUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ public string UpdateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ public int IsEffective { get; set; }
+
+ ///
+ /// 学员数量
+ ///
+ public int StudentCount { get; set; }
+
+ ///
+ /// 学习记录数量
+ ///
+ public int RecordCount { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassListOutput.cs
new file mode 100644
index 0000000..27ff100
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassListOutput.cs
@@ -0,0 +1,101 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 学习班级列表输出
+ ///
+ public class LqStudyClassListOutput
+ {
+ ///
+ /// 班级ID
+ ///
+ [Display(Name = "班级ID")]
+ public string id { get; set; }
+
+ ///
+ /// 班级名称
+ ///
+ [Display(Name = "班级名称")]
+ public string className { get; set; }
+
+ ///
+ /// 任教老师ID
+ ///
+ [Display(Name = "任教老师ID")]
+ public string teacherId { get; set; }
+
+ ///
+ /// 任教老师姓名
+ ///
+ [Display(Name = "任教老师姓名")]
+ public string teacherName { get; set; }
+
+ ///
+ /// 开始时间
+ ///
+ [Display(Name = "开始时间")]
+ public DateTime startTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ [Display(Name = "结束时间")]
+ public DateTime endTime { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [Display(Name = "备注")]
+ public string remark { get; set; }
+
+ ///
+ /// 学员数量
+ ///
+ [Display(Name = "学员数量")]
+ public int studentCount { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ [Display(Name = "创建人ID")]
+ public string createUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ [Display(Name = "创建人姓名")]
+ public string createUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Display(Name = "创建时间")]
+ public DateTime createTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ [Display(Name = "更新人ID")]
+ public string updateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ [Display(Name = "更新人姓名")]
+ public string updateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [Display(Name = "更新时间")]
+ public DateTime? updateTime { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ [Display(Name = "是否有效")]
+ public int isEffective { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassListQueryInput.cs
new file mode 100644
index 0000000..88b2a67
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassListQueryInput.cs
@@ -0,0 +1,42 @@
+using NCC.Common.Filter;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 学习班级列表查询输入
+ ///
+ public class LqStudyClassListQueryInput : PageInputBase
+ {
+ ///
+ /// 班级名称
+ ///
+ [Display(Name = "班级名称", Description = "根据班级名称筛选")]
+ public string ClassName { get; set; }
+
+ ///
+ /// 任教老师ID
+ ///
+ [Display(Name = "任教老师ID", Description = "根据任教老师ID筛选")]
+ public string TeacherId { get; set; }
+
+ ///
+ /// 开始时间(班级开始时间范围)
+ ///
+ [Display(Name = "开始时间", Description = "班级开始时间的开始范围")]
+ public DateTime? StartTime { get; set; }
+
+ ///
+ /// 结束时间(班级开始时间范围)
+ ///
+ [Display(Name = "结束时间", Description = "班级开始时间的结束范围")]
+ public DateTime? EndTime { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ [Display(Name = "是否有效", Description = "根据是否有效筛选")]
+ public int? IsEffective { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassUpInput.cs
new file mode 100644
index 0000000..b411443
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassUpInput.cs
@@ -0,0 +1,19 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 学习班级更新输入
+ ///
+ public class LqStudyClassUpInput : LqStudyClassCrInput
+ {
+ ///
+ /// 班级ID
+ ///
+ [Required(ErrorMessage = "班级ID不能为空")]
+ [StringLength(50, ErrorMessage = "班级ID长度不能超过50个字符")]
+ [Display(Name = "班级ID")]
+ public string Id { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordCreateInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordCreateInput.cs
new file mode 100644
index 0000000..176d944
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordCreateInput.cs
@@ -0,0 +1,83 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 添加学习记录输入
+ ///
+ public class LqStudyRecordCreateInput
+ {
+ ///
+ /// 员工姓名
+ ///
+ [Required(ErrorMessage = "员工姓名不能为空")]
+ [StringLength(50, ErrorMessage = "员工姓名长度不能超过50个字符")]
+ [Display(Name = "员工姓名")]
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [Required(ErrorMessage = "员工ID不能为空")]
+ [StringLength(50, ErrorMessage = "员工ID长度不能超过50个字符")]
+ [Display(Name = "员工ID")]
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 学习类型
+ ///
+ [Required(ErrorMessage = "学习类型不能为空")]
+ [StringLength(50, ErrorMessage = "学习类型长度不能超过50个字符")]
+ [Display(Name = "学习类型")]
+ public string StudyType { get; set; }
+
+ ///
+ /// 交通费
+ ///
+ [Range(0, double.MaxValue, ErrorMessage = "交通费不能为负数")]
+ [Display(Name = "交通费")]
+ public decimal? TransportFee { get; set; }
+
+ ///
+ /// 学习日期
+ ///
+ [Required(ErrorMessage = "学习日期不能为空")]
+ [Display(Name = "学习日期")]
+ public DateTime StudyDate { get; set; }
+
+ ///
+ /// 当日状态
+ ///
+ [StringLength(50, ErrorMessage = "当日状态长度不能超过50个字符")]
+ [Display(Name = "当日状态")]
+ public string DailyStatus { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [StringLength(500, ErrorMessage = "备注长度不能超过500个字符")]
+ [Display(Name = "备注")]
+ public string Remark { get; set; }
+
+ ///
+ /// 是否下店协助(1:是 0:否)
+ ///
+ [Display(Name = "是否下店协助")]
+ public int IsStoreAssist { get; set; } = 0;
+
+ ///
+ /// 下店门店ID
+ ///
+ [StringLength(50, ErrorMessage = "下店门店ID长度不能超过50个字符")]
+ [Display(Name = "下店门店ID")]
+ public string StoreId { get; set; }
+
+ ///
+ /// 下店门店名称
+ ///
+ [StringLength(100, ErrorMessage = "下店门店名称长度不能超过100个字符")]
+ [Display(Name = "下店门店名称")]
+ public string StoreName { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordListOutput.cs
new file mode 100644
index 0000000..e7c9ae9
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordListOutput.cs
@@ -0,0 +1,119 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 学习记录列表输出
+ ///
+ public class LqStudyRecordListOutput
+ {
+ ///
+ /// 学习记录ID
+ ///
+ [Display(Name = "学习记录ID")]
+ public string id { get; set; }
+
+ ///
+ /// 员工姓名
+ ///
+ [Display(Name = "员工姓名")]
+ public string employeeName { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [Display(Name = "员工ID")]
+ public string employeeId { get; set; }
+
+ ///
+ /// 学习类型
+ ///
+ [Display(Name = "学习类型")]
+ public string studyType { get; set; }
+
+ ///
+ /// 交通费
+ ///
+ [Display(Name = "交通费")]
+ public decimal? transportFee { get; set; }
+
+ ///
+ /// 学习日期
+ ///
+ [Display(Name = "学习日期")]
+ public DateTime studyDate { get; set; }
+
+ ///
+ /// 当日状态
+ ///
+ [Display(Name = "当日状态")]
+ public string dailyStatus { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [Display(Name = "备注")]
+ public string remark { get; set; }
+
+ ///
+ /// 是否下店协助
+ ///
+ [Display(Name = "是否下店协助")]
+ public int isStoreAssist { get; set; }
+
+ ///
+ /// 下店门店ID
+ ///
+ [Display(Name = "下店门店ID")]
+ public string storeId { get; set; }
+
+ ///
+ /// 下店门店名称
+ ///
+ [Display(Name = "下店门店名称")]
+ public string storeName { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ [Display(Name = "创建人ID")]
+ public string createUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ [Display(Name = "创建人姓名")]
+ public string createUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Display(Name = "创建时间")]
+ public DateTime createTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ [Display(Name = "更新人ID")]
+ public string updateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ [Display(Name = "更新人姓名")]
+ public string updateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [Display(Name = "更新时间")]
+ public DateTime? updateTime { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ [Display(Name = "是否有效")]
+ public int isEffective { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordListQueryInput.cs
new file mode 100644
index 0000000..a53d743
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordListQueryInput.cs
@@ -0,0 +1,66 @@
+using NCC.Common.Filter;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 学习记录列表查询输入
+ ///
+ public class LqStudyRecordListQueryInput : PageInputBase
+ {
+ ///
+ /// 员工姓名
+ ///
+ [Display(Name = "员工姓名", Description = "根据员工姓名筛选")]
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [Display(Name = "员工ID", Description = "根据员工ID筛选")]
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 学习类型
+ ///
+ [Display(Name = "学习类型", Description = "根据学习类型筛选")]
+ public string StudyType { get; set; }
+
+ ///
+ /// 学习日期开始
+ ///
+ [Display(Name = "学习日期开始", Description = "学习日期的开始范围")]
+ public DateTime? StudyDateStart { get; set; }
+
+ ///
+ /// 学习日期结束
+ ///
+ [Display(Name = "学习日期结束", Description = "学习日期的结束范围")]
+ public DateTime? StudyDateEnd { get; set; }
+
+ ///
+ /// 当日状态
+ ///
+ [Display(Name = "当日状态", Description = "根据当日状态筛选")]
+ public string DailyStatus { get; set; }
+
+ ///
+ /// 是否下店协助
+ ///
+ [Display(Name = "是否下店协助", Description = "根据是否下店协助筛选")]
+ public int? IsStoreAssist { get; set; }
+
+ ///
+ /// 门店ID
+ ///
+ [Display(Name = "门店ID", Description = "根据门店ID筛选")]
+ public string StoreId { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ [Display(Name = "是否有效", Description = "根据是否有效筛选")]
+ public int? IsEffective { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyStudentListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyStudentListOutput.cs
new file mode 100644
index 0000000..1301263
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyStudentListOutput.cs
@@ -0,0 +1,101 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 学习学员列表输出
+ ///
+ public class LqStudyStudentListOutput
+ {
+ ///
+ /// 学员ID
+ ///
+ [Display(Name = "学员ID")]
+ public string id { get; set; }
+
+ ///
+ /// 员工姓名
+ ///
+ [Display(Name = "员工姓名")]
+ public string employeeName { get; set; }
+
+ ///
+ /// 员工电话
+ ///
+ [Display(Name = "员工电话")]
+ public string employeePhone { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [Display(Name = "员工ID")]
+ public string employeeId { get; set; }
+
+ ///
+ /// 入院时间
+ ///
+ [Display(Name = "入院时间")]
+ public DateTime admissionTime { get; set; }
+
+ ///
+ /// 班级ID
+ ///
+ [Display(Name = "班级ID")]
+ public string classId { get; set; }
+
+ ///
+ /// 所属班级
+ ///
+ [Display(Name = "所属班级")]
+ public string className { get; set; }
+
+ ///
+ /// HR归属
+ ///
+ [Display(Name = "HR归属")]
+ public string hrBelong { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ [Display(Name = "创建人ID")]
+ public string createUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ [Display(Name = "创建人姓名")]
+ public string createUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Display(Name = "创建时间")]
+ public DateTime createTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ [Display(Name = "更新人ID")]
+ public string updateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ [Display(Name = "更新人姓名")]
+ public string updateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [Display(Name = "更新时间")]
+ public DateTime? updateTime { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ [Display(Name = "是否有效")]
+ public int isEffective { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyStudentListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyStudentListQueryInput.cs
new file mode 100644
index 0000000..f636a09
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyStudentListQueryInput.cs
@@ -0,0 +1,49 @@
+using NCC.Common.Filter;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyClass
+{
+ ///
+ /// 学习学员列表查询输入
+ ///
+ public class LqStudyStudentListQueryInput : PageInputBase
+ {
+ ///
+ /// 班级ID
+ ///
+ [Required(ErrorMessage = "班级ID不能为空")]
+ [Display(Name = "班级ID", Description = "根据班级ID筛选学员")]
+ public string ClassId { get; set; }
+
+ ///
+ /// 员工姓名
+ ///
+ [Display(Name = "员工姓名", Description = "根据员工姓名筛选")]
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工电话
+ ///
+ [Display(Name = "员工电话", Description = "根据员工电话筛选")]
+ public string EmployeePhone { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [Display(Name = "员工ID", Description = "根据员工ID筛选")]
+ public string EmployeeId { get; set; }
+
+ ///
+ /// HR归属
+ ///
+ [Display(Name = "HR归属", Description = "根据HR归属筛选")]
+ public string HrBelong { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ [Display(Name = "是否有效", Description = "根据是否有效筛选")]
+ public int? IsEffective { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordCrInput.cs
new file mode 100644
index 0000000..cfef67e
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordCrInput.cs
@@ -0,0 +1,84 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyRecord
+{
+ ///
+ /// 学习记录创建输入
+ ///
+ public class LqStudyRecordCrInput
+ {
+ ///
+ /// 员工姓名
+ ///
+ [Required(ErrorMessage = "员工姓名不能为空")]
+ [StringLength(50, ErrorMessage = "员工姓名长度不能超过50个字符")]
+ [Display(Name = "员工姓名")]
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [Required(ErrorMessage = "员工ID不能为空")]
+ [StringLength(50, ErrorMessage = "员工ID长度不能超过50个字符")]
+ [Display(Name = "员工ID")]
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 学习类型
+ ///
+ [Required(ErrorMessage = "学习类型不能为空")]
+ [StringLength(50, ErrorMessage = "学习类型长度不能超过50个字符")]
+ [Display(Name = "学习类型")]
+ public string StudyType { get; set; }
+
+ ///
+ /// 交通费
+ ///
+ [Range(0, double.MaxValue, ErrorMessage = "交通费不能小于0")]
+ [Display(Name = "交通费")]
+ public decimal? TransportFee { get; set; }
+
+ ///
+ /// 学习日期
+ ///
+ [Required(ErrorMessage = "学习日期不能为空")]
+ [Display(Name = "学习日期")]
+ public DateTime StudyDate { get; set; }
+
+ ///
+ /// 当日状态
+ ///
+ [Required(ErrorMessage = "当日状态不能为空")]
+ [StringLength(50, ErrorMessage = "当日状态长度不能超过50个字符")]
+ [Display(Name = "当日状态")]
+ public string DailyStatus { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [StringLength(1000, ErrorMessage = "备注长度不能超过1000个字符")]
+ [Display(Name = "备注")]
+ public string Remark { get; set; }
+
+ ///
+ /// 是否下店协助(1:是 0:否)
+ ///
+ [Display(Name = "是否下店协助")]
+ public int IsStoreAssist { get; set; } = 0;
+
+ ///
+ /// 下店门店ID
+ ///
+ [StringLength(50, ErrorMessage = "下店门店ID长度不能超过50个字符")]
+ [Display(Name = "下店门店ID")]
+ public string StoreId { get; set; }
+
+ ///
+ /// 下店门店名称
+ ///
+ [StringLength(100, ErrorMessage = "下店门店名称长度不能超过100个字符")]
+ [Display(Name = "下店门店名称")]
+ public string StoreName { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordInfoOutput.cs
new file mode 100644
index 0000000..f2a15a7
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordInfoOutput.cs
@@ -0,0 +1,100 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyRecord
+{
+ ///
+ /// 学习记录详情输出
+ ///
+ public class LqStudyRecordInfoOutput
+ {
+ ///
+ /// 学习记录ID
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// 员工姓名
+ ///
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 学习类型
+ ///
+ public string StudyType { get; set; }
+
+ ///
+ /// 交通费
+ ///
+ public decimal? TransportFee { get; set; }
+
+ ///
+ /// 学习日期
+ ///
+ public DateTime StudyDate { get; set; }
+
+ ///
+ /// 当日状态
+ ///
+ public string DailyStatus { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+
+ ///
+ /// 是否下店协助(1:是 0:否)
+ ///
+ public int IsStoreAssist { get; set; }
+
+ ///
+ /// 下店门店ID
+ ///
+ public string StoreId { get; set; }
+
+ ///
+ /// 下店门店名称
+ ///
+ public string StoreName { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ public string CreateUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ public string UpdateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ public int IsEffective { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordListOutput.cs
new file mode 100644
index 0000000..1ff0f1f
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordListOutput.cs
@@ -0,0 +1,100 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyRecord
+{
+ ///
+ /// 学习记录列表输出
+ ///
+ public class LqStudyRecordListOutput
+ {
+ ///
+ /// 学习记录ID
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// 员工姓名
+ ///
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 学习类型
+ ///
+ public string StudyType { get; set; }
+
+ ///
+ /// 交通费
+ ///
+ public decimal? TransportFee { get; set; }
+
+ ///
+ /// 学习日期
+ ///
+ public DateTime StudyDate { get; set; }
+
+ ///
+ /// 当日状态
+ ///
+ public string DailyStatus { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+
+ ///
+ /// 是否下店协助(1:是 0:否)
+ ///
+ public int IsStoreAssist { get; set; }
+
+ ///
+ /// 下店门店ID
+ ///
+ public string StoreId { get; set; }
+
+ ///
+ /// 下店门店名称
+ ///
+ public string StoreName { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ public string CreateUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ public string UpdateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ public int IsEffective { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordListQueryInput.cs
new file mode 100644
index 0000000..a8526ba
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordListQueryInput.cs
@@ -0,0 +1,55 @@
+using NCC.Common.Filter;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyRecord
+{
+ ///
+ /// 学习记录列表查询输入
+ ///
+ public class LqStudyRecordListQueryInput : PageInputBase
+ {
+ ///
+ /// 员工姓名
+ ///
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 学习类型
+ ///
+ public string StudyType { get; set; }
+
+ ///
+ /// 学习开始日期
+ ///
+ public System.DateTime? StudyStartDate { get; set; }
+
+ ///
+ /// 学习结束日期
+ ///
+ public System.DateTime? StudyEndDate { get; set; }
+
+ ///
+ /// 当日状态
+ ///
+ public string DailyStatus { get; set; }
+
+ ///
+ /// 是否下店协助
+ ///
+ public int? IsStoreAssist { get; set; }
+
+ ///
+ /// 下店门店ID
+ ///
+ public string StoreId { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ public int? IsEffective { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordUpInput.cs
new file mode 100644
index 0000000..a9a998b
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordUpInput.cs
@@ -0,0 +1,19 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyRecord
+{
+ ///
+ /// 学习记录更新输入
+ ///
+ public class LqStudyRecordUpInput : LqStudyRecordCrInput
+ {
+ ///
+ /// 学习记录ID
+ ///
+ [Required(ErrorMessage = "学习记录ID不能为空")]
+ [StringLength(50, ErrorMessage = "学习记录ID长度不能超过50个字符")]
+ [Display(Name = "学习记录ID")]
+ public string Id { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentCrInput.cs
new file mode 100644
index 0000000..23694f1
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentCrInput.cs
@@ -0,0 +1,65 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyStudent
+{
+ ///
+ /// 学习学员创建输入
+ ///
+ public class LqStudyStudentCrInput
+ {
+ ///
+ /// 员工姓名
+ ///
+ [Required(ErrorMessage = "员工姓名不能为空")]
+ [StringLength(50, ErrorMessage = "员工姓名长度不能超过50个字符")]
+ [Display(Name = "员工姓名")]
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工电话
+ ///
+ [Required(ErrorMessage = "员工电话不能为空")]
+ [StringLength(20, ErrorMessage = "员工电话长度不能超过20个字符")]
+ [Display(Name = "员工电话")]
+ public string EmployeePhone { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [Required(ErrorMessage = "员工ID不能为空")]
+ [StringLength(50, ErrorMessage = "员工ID长度不能超过50个字符")]
+ [Display(Name = "员工ID")]
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 入院时间
+ ///
+ [Required(ErrorMessage = "入院时间不能为空")]
+ [Display(Name = "入院时间")]
+ public DateTime AdmissionTime { get; set; }
+
+ ///
+ /// 班级ID
+ ///
+ [Required(ErrorMessage = "班级ID不能为空")]
+ [StringLength(50, ErrorMessage = "班级ID长度不能超过50个字符")]
+ [Display(Name = "班级ID")]
+ public string ClassId { get; set; }
+
+ ///
+ /// 所属班级
+ ///
+ [Required(ErrorMessage = "所属班级不能为空")]
+ [StringLength(100, ErrorMessage = "所属班级长度不能超过100个字符")]
+ [Display(Name = "所属班级")]
+ public string ClassName { get; set; }
+
+ ///
+ /// HR归属
+ ///
+ [StringLength(50, ErrorMessage = "HR归属长度不能超过50个字符")]
+ [Display(Name = "HR归属")]
+ public string HrBelong { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentInfoOutput.cs
new file mode 100644
index 0000000..fe4b122
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentInfoOutput.cs
@@ -0,0 +1,100 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyStudent
+{
+ ///
+ /// 学习学员详情输出
+ ///
+ public class LqStudyStudentInfoOutput
+ {
+ ///
+ /// 学员ID
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// 员工姓名
+ ///
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工电话
+ ///
+ public string EmployeePhone { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 入院时间
+ ///
+ public DateTime AdmissionTime { get; set; }
+
+ ///
+ /// 班级ID
+ ///
+ public string ClassId { get; set; }
+
+ ///
+ /// 所属班级
+ ///
+ public string ClassName { get; set; }
+
+ ///
+ /// HR归属
+ ///
+ public string HrBelong { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ public string CreateUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ public string UpdateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ public int IsEffective { get; set; }
+
+ ///
+ /// 学习记录数量
+ ///
+ public int RecordCount { get; set; }
+
+ ///
+ /// 总交通费
+ ///
+ public decimal TotalTransportFee { get; set; }
+
+ ///
+ /// 下店协助次数
+ ///
+ public int StoreAssistCount { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentListOutput.cs
new file mode 100644
index 0000000..3fdeb1e
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentListOutput.cs
@@ -0,0 +1,90 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyStudent
+{
+ ///
+ /// 学习学员列表输出
+ ///
+ public class LqStudyStudentListOutput
+ {
+ ///
+ /// 学员ID
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// 员工姓名
+ ///
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工电话
+ ///
+ public string EmployeePhone { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 入院时间
+ ///
+ public DateTime AdmissionTime { get; set; }
+
+ ///
+ /// 班级ID
+ ///
+ public string ClassId { get; set; }
+
+ ///
+ /// 所属班级
+ ///
+ public string ClassName { get; set; }
+
+ ///
+ /// HR归属
+ ///
+ public string HrBelong { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建人姓名
+ ///
+ public string CreateUserName { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新人姓名
+ ///
+ public string UpdateUserName { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ public int IsEffective { get; set; }
+
+ ///
+ /// 学习记录数量
+ ///
+ public int RecordCount { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentListQueryInput.cs
new file mode 100644
index 0000000..631e404
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentListQueryInput.cs
@@ -0,0 +1,55 @@
+using NCC.Common.Filter;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyStudent
+{
+ ///
+ /// 学习学员列表查询输入
+ ///
+ public class LqStudyStudentListQueryInput : PageInputBase
+ {
+ ///
+ /// 员工姓名
+ ///
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工电话
+ ///
+ public string EmployeePhone { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 班级ID
+ ///
+ public string ClassId { get; set; }
+
+ ///
+ /// 所属班级
+ ///
+ public string ClassName { get; set; }
+
+ ///
+ /// HR归属
+ ///
+ public string HrBelong { get; set; }
+
+ ///
+ /// 入院开始时间
+ ///
+ public System.DateTime? AdmissionStartTime { get; set; }
+
+ ///
+ /// 入院结束时间
+ ///
+ public System.DateTime? AdmissionEndTime { get; set; }
+
+ ///
+ /// 是否有效
+ ///
+ public int? IsEffective { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentUpInput.cs
new file mode 100644
index 0000000..aef3dd5
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentUpInput.cs
@@ -0,0 +1,19 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqStudyStudent
+{
+ ///
+ /// 学习学员更新输入
+ ///
+ public class LqStudyStudentUpInput : LqStudyStudentCrInput
+ {
+ ///
+ /// 学员ID
+ ///
+ [Required(ErrorMessage = "学员ID不能为空")]
+ [StringLength(50, ErrorMessage = "学员ID长度不能超过50个字符")]
+ [Display(Name = "学员ID")]
+ public string Id { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_inventory/LqInventoryEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_inventory/LqInventoryEntity.cs
new file mode 100644
index 0000000..075781b
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_inventory/LqInventoryEntity.cs
@@ -0,0 +1,86 @@
+using System;
+using NCC.Common.Const;
+using SqlSugar;
+
+namespace NCC.Extend.Entitys.lq_inventory
+{
+ ///
+ /// 库存表
+ ///
+ [SugarTable("lq_inventory")]
+ [Tenant(ClaimConst.TENANT_ID)]
+ public class LqInventoryEntity
+ {
+ ///
+ /// 库存ID
+ ///
+ [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ ///
+ /// 产品名称
+ ///
+ [SugarColumn(ColumnName = "F_ProductName")]
+ public string ProductName { get; set; }
+
+ ///
+ /// 价格
+ ///
+ [SugarColumn(ColumnName = "F_Price")]
+ public decimal Price { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [SugarColumn(ColumnName = "F_Quantity")]
+ public int Quantity { get; set; } = 0;
+
+ ///
+ /// 产品类别
+ ///
+ [SugarColumn(ColumnName = "F_ProductCategory")]
+ public string ProductCategory { get; set; }
+
+ ///
+ /// 归属部门ID
+ ///
+ [SugarColumn(ColumnName = "F_DepartmentId")]
+ public string DepartmentId { get; set; }
+
+ ///
+ /// 标准单位
+ ///
+ [SugarColumn(ColumnName = "F_StandardUnit")]
+ public string StandardUnit { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ [SugarColumn(ColumnName = "F_CreateUser")]
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "F_CreateTime")]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ [SugarColumn(ColumnName = "F_UpdateUser")]
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "F_UpdateTime")]
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ [SugarColumn(ColumnName = "F_IsEffective")]
+ public int IsEffective { get; set; } = 1;
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_inventory_usage/LqInventoryUsageEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_inventory_usage/LqInventoryUsageEntity.cs
new file mode 100644
index 0000000..745b1a9
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_inventory_usage/LqInventoryUsageEntity.cs
@@ -0,0 +1,80 @@
+using System;
+using NCC.Common.Const;
+using SqlSugar;
+
+namespace NCC.Extend.Entitys.lq_inventory_usage
+{
+ ///
+ /// 库存使用记录表
+ ///
+ [SugarTable("lq_inventory_usage")]
+ [Tenant(ClaimConst.TENANT_ID)]
+ public class LqInventoryUsageEntity
+ {
+ ///
+ /// 使用记录ID
+ ///
+ [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ ///
+ /// 产品ID
+ ///
+ [SugarColumn(ColumnName = "F_ProductId")]
+ public string ProductId { get; set; }
+
+ ///
+ /// 门店ID
+ ///
+ [SugarColumn(ColumnName = "F_StoreId")]
+ public string StoreId { get; set; }
+
+ ///
+ /// 使用时间
+ ///
+ [SugarColumn(ColumnName = "F_UsageTime")]
+ public DateTime UsageTime { get; set; }
+
+ ///
+ /// 使用数量
+ ///
+ [SugarColumn(ColumnName = "F_UsageQuantity")]
+ public int UsageQuantity { get; set; }
+
+ ///
+ /// 关联消耗ID
+ ///
+ [SugarColumn(ColumnName = "F_RelatedConsumeId")]
+ public string RelatedConsumeId { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ [SugarColumn(ColumnName = "F_CreateUser")]
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "F_CreateTime")]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ [SugarColumn(ColumnName = "F_UpdateUser")]
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "F_UpdateTime")]
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ [SugarColumn(ColumnName = "F_IsEffective")]
+ public int IsEffective { get; set; } = 1;
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_class/LqStudyClassEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_class/LqStudyClassEntity.cs
new file mode 100644
index 0000000..5e0805e
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_class/LqStudyClassEntity.cs
@@ -0,0 +1,80 @@
+using System;
+using NCC.Common.Const;
+using SqlSugar;
+
+namespace NCC.Extend.Entitys.lq_study_class
+{
+ ///
+ /// 学习班级表
+ ///
+ [SugarTable("lq_study_class")]
+ [Tenant(ClaimConst.TENANT_ID)]
+ public class LqStudyClassEntity
+ {
+ ///
+ /// 班级ID
+ ///
+ [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ ///
+ /// 班级名称
+ ///
+ [SugarColumn(ColumnName = "F_ClassName")]
+ public string ClassName { get; set; }
+
+ ///
+ /// 任教老师ID
+ ///
+ [SugarColumn(ColumnName = "F_TeacherId")]
+ public string TeacherId { get; set; }
+
+ ///
+ /// 开始时间
+ ///
+ [SugarColumn(ColumnName = "F_StartTime")]
+ public DateTime StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ [SugarColumn(ColumnName = "F_EndTime")]
+ public DateTime EndTime { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [SugarColumn(ColumnName = "F_Remark")]
+ public string Remark { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ [SugarColumn(ColumnName = "F_CreateUser")]
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "F_CreateTime")]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ [SugarColumn(ColumnName = "F_UpdateUser")]
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "F_UpdateTime")]
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ [SugarColumn(ColumnName = "F_IsEffective")]
+ public int IsEffective { get; set; } = 1;
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_record/LqStudyRecordEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_record/LqStudyRecordEntity.cs
new file mode 100644
index 0000000..eb4cd0d
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_record/LqStudyRecordEntity.cs
@@ -0,0 +1,110 @@
+using System;
+using NCC.Common.Const;
+using SqlSugar;
+
+namespace NCC.Extend.Entitys.lq_study_record
+{
+ ///
+ /// 学习记录表
+ ///
+ [SugarTable("lq_study_record")]
+ [Tenant(ClaimConst.TENANT_ID)]
+ public class LqStudyRecordEntity
+ {
+ ///
+ /// 学习记录ID
+ ///
+ [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ ///
+ /// 员工姓名
+ ///
+ [SugarColumn(ColumnName = "F_EmployeeName")]
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [SugarColumn(ColumnName = "F_EmployeeId")]
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 学习类型
+ ///
+ [SugarColumn(ColumnName = "F_StudyType")]
+ public string StudyType { get; set; }
+
+ ///
+ /// 交通费
+ ///
+ [SugarColumn(ColumnName = "F_TransportFee")]
+ public decimal? TransportFee { get; set; }
+
+ ///
+ /// 学习日期
+ ///
+ [SugarColumn(ColumnName = "F_StudyDate")]
+ public DateTime StudyDate { get; set; }
+
+ ///
+ /// 当日状态
+ ///
+ [SugarColumn(ColumnName = "F_DailyStatus")]
+ public string DailyStatus { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [SugarColumn(ColumnName = "F_Remark")]
+ public string Remark { get; set; }
+
+ ///
+ /// 是否下店协助(1:是 0:否)
+ ///
+ [SugarColumn(ColumnName = "F_IsStoreAssist")]
+ public int IsStoreAssist { get; set; } = 0;
+
+ ///
+ /// 下店门店ID
+ ///
+ [SugarColumn(ColumnName = "F_StoreId")]
+ public string StoreId { get; set; }
+
+ ///
+ /// 下店门店名称
+ ///
+ [SugarColumn(ColumnName = "F_StoreName")]
+ public string StoreName { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ [SugarColumn(ColumnName = "F_CreateUser")]
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "F_CreateTime")]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ [SugarColumn(ColumnName = "F_UpdateUser")]
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "F_UpdateTime")]
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ [SugarColumn(ColumnName = "F_IsEffective")]
+ public int IsEffective { get; set; } = 1;
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_student/LqStudyStudentEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_student/LqStudyStudentEntity.cs
new file mode 100644
index 0000000..e9be16c
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_student/LqStudyStudentEntity.cs
@@ -0,0 +1,98 @@
+using System;
+using NCC.Common.Const;
+using SqlSugar;
+
+namespace NCC.Extend.Entitys.lq_study_student
+{
+ ///
+ /// 学习学员表
+ ///
+ [SugarTable("lq_study_student")]
+ [Tenant(ClaimConst.TENANT_ID)]
+ public class LqStudyStudentEntity
+ {
+ ///
+ /// 学员ID
+ ///
+ [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ ///
+ /// 员工姓名
+ ///
+ [SugarColumn(ColumnName = "F_EmployeeName")]
+ public string EmployeeName { get; set; }
+
+ ///
+ /// 员工电话
+ ///
+ [SugarColumn(ColumnName = "F_EmployeePhone")]
+ public string EmployeePhone { get; set; }
+
+ ///
+ /// 员工ID
+ ///
+ [SugarColumn(ColumnName = "F_EmployeeId")]
+ public string EmployeeId { get; set; }
+
+ ///
+ /// 入院时间
+ ///
+ [SugarColumn(ColumnName = "F_AdmissionTime")]
+ public DateTime AdmissionTime { get; set; }
+
+ ///
+ /// 班级ID
+ ///
+ [SugarColumn(ColumnName = "F_ClassId")]
+ public string ClassId { get; set; }
+
+ ///
+ /// 所属班级
+ ///
+ [SugarColumn(ColumnName = "F_ClassName")]
+ public string ClassName { get; set; }
+
+ ///
+ /// HR归属
+ ///
+ [SugarColumn(ColumnName = "F_HrBelong")]
+ public string HrBelong { get; set; }
+
+ ///
+ /// 创建人ID
+ ///
+ [SugarColumn(ColumnName = "F_CreateUser")]
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "F_CreateTime")]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新人ID
+ ///
+ [SugarColumn(ColumnName = "F_UpdateUser")]
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "F_UpdateTime")]
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 是否有效(1:有效 0:无效)
+ ///
+ [SugarColumn(ColumnName = "F_IsEffective")]
+ public int IsEffective { get; set; } = 1;
+
+ ///
+ /// 删除标记(0:未删除 1:已删除)
+ ///
+ [SugarColumn(ColumnName = "F_DeleteMark")]
+ public int? DeleteMark { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqInventory/ILqInventoryService.cs b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqInventory/ILqInventoryService.cs
new file mode 100644
index 0000000..9fe839c
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqInventory/ILqInventoryService.cs
@@ -0,0 +1,13 @@
+using System.Threading.Tasks;
+using NCC.Extend.Entitys.Dto.LqInventory;
+using NCC.Common.Filter;
+
+namespace NCC.Extend.Interfaces.LqInventory
+{
+ ///
+ /// 库存服务接口
+ ///
+ public interface ILqInventoryService
+ {
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqInventoryUsage/ILqInventoryUsageService.cs b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqInventoryUsage/ILqInventoryUsageService.cs
new file mode 100644
index 0000000..45a3cf4
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqInventoryUsage/ILqInventoryUsageService.cs
@@ -0,0 +1,62 @@
+using System.Threading.Tasks;
+using NCC.Extend.Entitys.Dto.LqInventoryUsage;
+using NCC.Common.Filter;
+
+namespace NCC.Extend.Interfaces.LqInventoryUsage
+{
+ ///
+ /// 库存使用记录服务接口
+ ///
+ public interface ILqInventoryUsageService
+ {
+ ///
+ /// 添加库存使用记录
+ ///
+ /// 创建输入
+ ///
+ Task CreateAsync(LqInventoryUsageCrInput input);
+
+ ///
+ /// 作废库存使用记录
+ ///
+ /// 使用记录ID
+ /// 作废备注
+ ///
+ Task CancelAsync(string id, string remarks = null);
+
+ ///
+ /// 获取使用记录列表
+ ///
+ /// 查询输入
+ ///
+ Task GetListAsync(LqInventoryUsageListQueryInput input);
+
+ ///
+ /// 统计时间周期内每个产品的使用数量
+ ///
+ /// 统计查询输入
+ ///
+ Task GetProductUsageStatisticsAsync(LqInventoryUsageStatisticsInput input);
+
+ ///
+ /// 统计时间周期内每个门店的使用情况
+ ///
+ /// 统计查询输入
+ ///
+ Task GetStoreUsageStatisticsAsync(LqInventoryUsageStatisticsInput input);
+
+ ///
+ /// 统计时间周期内使用趋势
+ ///
+ /// 统计查询输入
+ ///
+ Task GetUsageTrendStatisticsAsync(LqInventoryUsageStatisticsInput input);
+
+ ///
+ /// 统计产品使用排行榜
+ ///
+ /// 统计查询输入
+ ///
+ Task GetProductUsageRankingAsync(LqInventoryUsageStatisticsInput input);
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqStudyClass/ILqStudyClassService.cs b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqStudyClass/ILqStudyClassService.cs
new file mode 100644
index 0000000..453c3ad
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqStudyClass/ILqStudyClassService.cs
@@ -0,0 +1,54 @@
+using System.Threading.Tasks;
+using NCC.Extend.Entitys.Dto.LqStudyClass;
+using NCC.Common.Filter;
+
+namespace NCC.Extend.Interfaces.LqStudyClass
+{
+ ///
+ /// 学习班级服务接口
+ ///
+ public interface ILqStudyClassService
+ {
+ ///
+ /// 创建学习班级并添加学员
+ ///
+ /// 创建输入
+ ///
+ Task CreateClassWithStudentsAsync(LqStudyClassCreateWithStudentsInput input);
+
+ ///
+ /// 向现有班级添加学员
+ ///
+ /// 添加学员输入
+ ///
+ Task AddStudentsToClassAsync(LqStudyClassAddStudentsInput input);
+
+ ///
+ /// 获取所有班级列表
+ ///
+ /// 查询输入
+ ///
+ Task GetClassListAsync(LqStudyClassListQueryInput input);
+
+ ///
+ /// 获取班级下所有学员信息
+ ///
+ /// 查询输入
+ ///
+ Task GetStudentListByClassIdAsync(LqStudyStudentListQueryInput input);
+
+ ///
+ /// 添加学习记录
+ ///
+ /// 学习记录输入
+ ///
+ Task AddStudyRecordAsync(LqStudyRecordCreateInput input);
+
+ ///
+ /// 获取学习记录列表
+ ///
+ /// 查询输入
+ ///
+ Task GetStudyRecordListAsync(LqStudyRecordListQueryInput input);
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqInventoryService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqInventoryService.cs
new file mode 100644
index 0000000..6344fa0
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqInventoryService.cs
@@ -0,0 +1,251 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using NCC.Common.Core.Manager;
+using NCC.Common.Enum;
+using NCC.Common.Filter;
+using NCC.Dependency;
+using NCC.DynamicApiController;
+using NCC.Extend.Entitys.Dto.LqInventory;
+using NCC.Extend.Entitys.Enum;
+using NCC.Extend.Entitys.lq_inventory;
+using NCC.Extend.Interfaces.LqInventory;
+using NCC.FriendlyException;
+using NCC.System.Entitys.Permission;
+using SqlSugar;
+using Yitter.IdGenerator;
+
+namespace NCC.Extend
+{
+ ///
+ /// 库存服务
+ ///
+ [ApiDescriptionSettings(Tag = "绿纤库存管理", Name = "LqInventory", Order = 200)]
+ [Route("api/Extend/LqInventory")]
+ public class LqInventoryService : IDynamicApiController, ITransient, ILqInventoryService
+ {
+ private readonly IUserManager _userManager;
+ private readonly ILogger _logger;
+ private readonly ISqlSugarClient _db;
+
+ ///
+ /// 构造函数
+ ///
+ /// 用户管理器
+ /// 日志记录器
+ /// 数据库客户端
+ public LqInventoryService(IUserManager userManager, ILogger logger, ISqlSugarClient db)
+ {
+ _userManager = userManager;
+ _logger = logger;
+ _db = db;
+ }
+
+ #region 创建库存
+ ///
+ /// 创建库存
+ ///
+ /// 创建输入
+ /// 创建结果
+ [HttpPost("Create")]
+ public async Task CreateAsync([FromBody] LqInventoryCrInput input)
+ {
+ try
+ {
+ // 检查产品名称是否已存在
+ var existingProduct = await _db.Queryable()
+ .Where(x => x.ProductName == input.ProductName && x.IsEffective == StatusEnum.有效.GetHashCode())
+ .FirstAsync();
+ if (existingProduct != null)
+ {
+ throw NCCException.Oh($"产品名称'{input.ProductName}'已存在");
+ }
+
+ // 创建库存记录
+ var inventoryEntity = new LqInventoryEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ ProductName = input.ProductName,
+ Price = input.Price,
+ Quantity = input.Quantity,
+ ProductCategory = input.ProductCategory,
+ DepartmentId = input.DepartmentId,
+ StandardUnit = input.StandardUnit,
+ CreateUser = _userManager.UserId,
+ CreateTime = DateTime.Now,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ };
+
+ var isOk = await _db.Insertable(inventoryEntity).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "创建库存失败");
+ throw NCCException.Oh($"创建失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 更新库存
+ ///
+ /// 更新库存
+ ///
+ /// 更新输入
+ /// 更新结果
+ [HttpPut("Update")]
+ public async Task UpdateAsync([FromBody] LqInventoryUpInput input)
+ {
+ try
+ {
+ // 检查库存记录是否存在
+ var existingInventory = await _db.Queryable()
+ .Where(x => x.Id == input.Id && x.IsEffective == StatusEnum.有效.GetHashCode())
+ .FirstAsync();
+
+ if (existingInventory == null)
+ {
+ throw NCCException.Oh("库存记录不存在或已失效");
+ }
+
+ // 检查产品名称是否与其他记录重复
+ var duplicateProduct = await _db.Queryable()
+ .Where(x => x.ProductName == input.ProductName && x.Id != input.Id && x.IsEffective == StatusEnum.有效.GetHashCode())
+ .FirstAsync();
+
+ if (duplicateProduct != null)
+ {
+ throw NCCException.Oh($"产品名称'{input.ProductName}'已存在");
+ }
+
+ // 更新库存记录
+ existingInventory.ProductName = input.ProductName;
+ existingInventory.Price = input.Price;
+ existingInventory.Quantity = input.Quantity;
+ existingInventory.ProductCategory = input.ProductCategory;
+ existingInventory.DepartmentId = input.DepartmentId;
+ existingInventory.StandardUnit = input.StandardUnit;
+ existingInventory.UpdateUser = _userManager.UserId;
+ existingInventory.UpdateTime = DateTime.Now;
+
+ var isOk = await _db.Updateable(existingInventory).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "更新库存失败");
+ throw NCCException.Oh($"更新失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 获取库存列表
+ ///
+ /// 获取库存列表
+ ///
+ /// 查询输入
+ /// 库存列表
+ [HttpGet("GetList")]
+ public async Task GetListAsync([FromQuery] LqInventoryListQueryInput input)
+ {
+ try
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+
+ // 查询库存信息
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductName), x => x.ProductName.Contains(input.ProductName))
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), x => x.ProductCategory.Contains(input.ProductCategory))
+ .WhereIF(!string.IsNullOrWhiteSpace(input.DepartmentId), x => x.DepartmentId == input.DepartmentId)
+ .WhereIF(input.PriceMin.HasValue, x => x.Price >= input.PriceMin.Value)
+ .WhereIF(input.PriceMax.HasValue, x => x.Price <= input.PriceMax.Value)
+ .WhereIF(input.QuantityMin.HasValue, x => x.Quantity >= input.QuantityMin.Value)
+ .WhereIF(input.QuantityMax.HasValue, x => x.Quantity <= input.QuantityMax.Value)
+ .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value)
+ .Select(x => new LqInventoryListOutput
+ {
+ id = x.Id,
+ productName = x.ProductName,
+ price = x.Price,
+ quantity = x.Quantity,
+ productCategory = x.ProductCategory,
+ departmentId = x.DepartmentId,
+ departmentName = SqlFunc.Subqueryable().Where(u => u.Id == x.DepartmentId).Select(u => u.RealName),
+ standardUnit = x.StandardUnit,
+ totalValue = x.Price * x.Quantity,
+ createUser = x.CreateUser,
+ createUserName = SqlFunc.Subqueryable().Where(u => u.Id == x.CreateUser).Select(u => u.RealName),
+ createTime = x.CreateTime,
+ updateUser = x.UpdateUser,
+ updateUserName = SqlFunc.Subqueryable().Where(u => u.Id == x.UpdateUser).Select(u => u.RealName),
+ updateTime = x.UpdateTime,
+ isEffective = x.IsEffective
+ })
+ .MergeTable()
+ .OrderBy(sidx + " " + input.sort)
+ .ToPagedListAsync(input.currentPage, input.pageSize);
+ return PageResult.SqlSugarPageResult(data);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取库存列表失败");
+ throw NCCException.Oh($"获取库存列表失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 获取库存详情
+ ///
+ /// 获取库存详情
+ ///
+ /// 库存ID
+ /// 库存详情
+ [HttpGet("GetInfo")]
+ public async Task GetInfoAsync([FromQuery] string id)
+ {
+ try
+ {
+ if (string.IsNullOrWhiteSpace(id))
+ {
+ throw NCCException.Oh("库存ID不能为空");
+ }
+ var inventory = await _db.Queryable().Where(x => x.Id == id).FirstAsync();
+
+ if (inventory == null)
+ {
+ throw NCCException.Oh("库存记录不存在");
+ }
+ var result = new LqInventoryInfoOutput
+ {
+ id = inventory.Id,
+ productName = inventory.ProductName,
+ price = inventory.Price,
+ quantity = inventory.Quantity,
+ productCategory = inventory.ProductCategory,
+ departmentId = inventory.DepartmentId,
+ departmentName = SqlFunc.Subqueryable().Where(u => u.Id == inventory.DepartmentId).Select(u => u.RealName),
+ standardUnit = inventory.StandardUnit,
+ totalValue = inventory.Price * inventory.Quantity,
+ createUser = inventory.CreateUser,
+ createUserName = SqlFunc.Subqueryable().Where(u => u.Id == inventory.CreateUser).Select(u => u.RealName),
+ createTime = inventory.CreateTime,
+ updateUser = inventory.UpdateUser,
+ updateUserName = SqlFunc.Subqueryable().Where(u => u.Id == inventory.UpdateUser).Select(u => u.RealName),
+ updateTime = inventory.UpdateTime,
+ isEffective = inventory.IsEffective
+ };
+
+ return result;
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取库存详情失败");
+ throw NCCException.Oh($"获取库存详情失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqInventoryUsageService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqInventoryUsageService.cs
new file mode 100644
index 0000000..dcf331e
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqInventoryUsageService.cs
@@ -0,0 +1,455 @@
+using System;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using NCC.Common.Core.Manager;
+using NCC.Common.Enum;
+using NCC.Common.Filter;
+using NCC.Dependency;
+using NCC.DynamicApiController;
+using NCC.Extend.Entitys.Dto.LqInventoryUsage;
+using NCC.Extend.Entitys.Enum;
+using NCC.Extend.Entitys.lq_inventory;
+using NCC.Extend.Entitys.lq_inventory_usage;
+using NCC.Extend.Interfaces.LqInventoryUsage;
+using NCC.FriendlyException;
+using NCC.System.Entitys.Permission;
+using SqlSugar;
+using Yitter.IdGenerator;
+
+namespace NCC.Extend
+{
+ ///
+ /// 库存使用记录服务
+ ///
+ [ApiDescriptionSettings(Tag = "绿纤库存使用记录管理", Name = "LqInventoryUsage", Order = 200)]
+ [Route("api/Extend/LqInventoryUsage")]
+ public class LqInventoryUsageService : IDynamicApiController, ITransient, ILqInventoryUsageService
+ {
+ private readonly IUserManager _userManager;
+ private readonly ILogger _logger;
+ private readonly ISqlSugarClient _db;
+
+ ///
+ /// 构造函数
+ ///
+ /// 用户管理器
+ /// 日志记录器
+ /// 数据库客户端
+ public LqInventoryUsageService(IUserManager userManager, ILogger logger, ISqlSugarClient db)
+ {
+ _userManager = userManager;
+ _logger = logger;
+ _db = db;
+ }
+
+ #region 添加库存使用记录
+ ///
+ /// 添加库存使用记录
+ ///
+ /// 创建输入
+ /// 创建结果
+ [HttpPost("Create")]
+ public async Task CreateAsync([FromBody] LqInventoryUsageCrInput input)
+ {
+ try
+ {
+ // 验证产品是否存在
+ var product = await _db.Queryable().Where(x => x.Id == input.ProductId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync();
+
+ if (product == null)
+ {
+ throw NCCException.Oh("产品不存在或已失效");
+ }
+
+ // 检查库存数量是否足够
+ if (product.Quantity < input.UsageQuantity)
+ {
+ throw NCCException.Oh($"库存不足,当前库存:{product.Quantity},需要数量:{input.UsageQuantity}");
+ }
+
+ _db.Ado.BeginTran();
+
+ // 创建使用记录
+ var usageEntity = new LqInventoryUsageEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ ProductId = input.ProductId,
+ StoreId = input.StoreId,
+ UsageTime = input.UsageTime,
+ UsageQuantity = input.UsageQuantity,
+ RelatedConsumeId = input.RelatedConsumeId,
+ CreateUser = _userManager.UserId,
+ CreateTime = DateTime.Now,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ };
+
+ var isOk = await _db.Insertable(usageEntity).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
+
+ // 更新库存数量
+ product.Quantity -= input.UsageQuantity;
+ product.UpdateUser = _userManager.UserId;
+ product.UpdateTime = DateTime.Now;
+ var updateOk = await _db.Updateable(product).ExecuteCommandAsync();
+ if (!(updateOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
+ _db.Ado.CommitTran();
+ }
+ catch (Exception ex)
+ {
+ _db.Ado.RollbackTran();
+ _logger.LogError(ex, "添加库存使用记录失败");
+ throw NCCException.Oh($"添加失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 作废库存使用记录
+ ///
+ /// 作废库存使用记录
+ ///
+ /// 使用记录ID
+ /// 作废备注
+ /// 作废结果
+ [HttpPut("Cancel")]
+ public async Task CancelAsync([FromQuery] string id, [FromQuery] string remarks = null)
+ {
+ try
+ {
+ if (string.IsNullOrWhiteSpace(id))
+ {
+ throw NCCException.Oh("使用记录ID不能为空");
+ }
+
+ // 检查使用记录是否存在
+ var usageRecord = await _db.Queryable().Where(x => x.Id == id && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync();
+
+ if (usageRecord == null)
+ {
+ throw NCCException.Oh("使用记录不存在或已失效");
+ }
+
+ _db.Ado.BeginTran();
+
+ // 作废使用记录
+ usageRecord.IsEffective = StatusEnum.无效.GetHashCode();
+ usageRecord.UpdateUser = _userManager.UserId;
+ usageRecord.UpdateTime = DateTime.Now;
+
+ var isOk = await _db.Updateable(usageRecord).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1003);
+ // 恢复库存数量
+ var product = await _db.Queryable().Where(x => x.Id == usageRecord.ProductId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync();
+ if (product != null)
+ {
+ product.Quantity += usageRecord.UsageQuantity;
+ product.UpdateUser = _userManager.UserId;
+ product.UpdateTime = DateTime.Now;
+ var updateOk = await _db.Updateable(product).ExecuteCommandAsync();
+ if (!(updateOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
+ }
+
+ _db.Ado.CommitTran();
+ }
+ catch (Exception ex)
+ {
+ _db.Ado.RollbackTran();
+ _logger.LogError(ex, "作废库存使用记录失败");
+ throw NCCException.Oh($"作废失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 获取使用记录列表
+ ///
+ /// 获取使用记录列表
+ ///
+ /// 查询输入
+ /// 使用记录列表
+ [HttpGet("GetList")]
+ public async Task GetListAsync([FromQuery] LqInventoryUsageListQueryInput input)
+ {
+ try
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+
+ // 查询使用记录信息
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), x => x.ProductId == input.ProductId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), x => x.StoreId == input.StoreId)
+ .WhereIF(input.UsageStartTime.HasValue, x => x.UsageTime >= input.UsageStartTime.Value)
+ .WhereIF(input.UsageEndTime.HasValue, x => x.UsageTime <= input.UsageEndTime.Value)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.RelatedConsumeId), x => x.RelatedConsumeId == input.RelatedConsumeId)
+ .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value)
+ .Select(x => new LqInventoryUsageListOutput
+ {
+ Id = x.Id,
+ ProductId = x.ProductId,
+ ProductName = SqlFunc.Subqueryable().Where(p => p.Id == x.ProductId).Select(p => p.ProductName),
+ ProductCategory = SqlFunc.Subqueryable().Where(p => p.Id == x.ProductId).Select(p => p.ProductCategory),
+ ProductPrice = SqlFunc.Subqueryable().Where(p => p.Id == x.ProductId).Select(p => p.Price),
+ StoreId = x.StoreId,
+ StoreName = SqlFunc.Subqueryable().Where(u => u.Id == x.StoreId).Select(u => u.RealName),
+ UsageTime = x.UsageTime,
+ UsageQuantity = x.UsageQuantity,
+ RelatedConsumeId = x.RelatedConsumeId,
+ CreateUser = x.CreateUser,
+ CreateUserName = SqlFunc.Subqueryable().Where(u => u.Id == x.CreateUser).Select(u => u.RealName),
+ CreateTime = x.CreateTime,
+ UpdateUser = x.UpdateUser,
+ UpdateUserName = SqlFunc.Subqueryable().Where(u => u.Id == x.UpdateUser).Select(u => u.RealName),
+ UpdateTime = x.UpdateTime,
+ IsEffective = x.IsEffective
+ })
+ .MergeTable()
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductName), x => x.ProductName.Contains(input.ProductName))
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), x => x.ProductCategory.Contains(input.ProductCategory))
+ .WhereIF(!string.IsNullOrWhiteSpace(input.StoreName), x => x.StoreName.Contains(input.StoreName))
+ .OrderBy(sidx + " " + input.sort)
+ .ToPagedListAsync(input.currentPage, input.pageSize);
+ return PageResult.SqlSugarPageResult(data);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取使用记录列表失败");
+ throw NCCException.Oh($"获取使用记录列表失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 统计时间周期内每个产品的使用数量
+ ///
+ /// 统计时间周期内每个产品的使用数量
+ ///
+ /// 统计查询输入
+ /// 产品使用统计
+ [HttpPost("GetProductUsageStatistics")]
+ public async Task GetProductUsageStatisticsAsync([FromBody] LqInventoryUsageStatisticsInput input)
+ {
+ try
+ {
+ var data = await _db.Queryable()
+ .LeftJoin((usage, product) => usage.ProductId == product.Id)
+ .Where((usage, product) => usage.UsageTime >= input.StartTime && usage.UsageTime <= input.EndTime)
+ .Where((usage, product) => usage.IsEffective == StatusEnum.有效.GetHashCode())
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), (usage, product) => usage.ProductId == input.ProductId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), (usage, product) => usage.StoreId == input.StoreId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), (usage, product) => product.ProductCategory == input.ProductCategory)
+ .GroupBy((usage, product) => new { usage.ProductId, product.ProductName, product.ProductCategory, product.Price })
+ .Select((usage, product) => new ProductUsageStatisticsOutput
+ {
+ ProductId = usage.ProductId,
+ ProductName = product.ProductName,
+ ProductCategory = product.ProductCategory,
+ ProductPrice = product.Price,
+ TotalUsageQuantity = SqlFunc.AggregateSum(usage.UsageQuantity),
+ TotalUsageAmount = SqlFunc.AggregateSum(usage.UsageQuantity * product.Price),
+ UsageCount = SqlFunc.AggregateCount(usage.Id),
+ AverageUsageQuantity = SqlFunc.AggregateAvg(usage.UsageQuantity)
+ })
+ .ToListAsync();
+
+ return new
+ {
+ success = true,
+ data = data,
+ total = data.Count,
+ message = "产品使用统计查询成功"
+ };
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取产品使用统计失败");
+ throw NCCException.Oh($"获取产品使用统计失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 统计时间周期内每个门店的使用情况
+ ///
+ /// 统计时间周期内每个门店的使用情况
+ ///
+ /// 统计查询输入
+ /// 门店使用统计
+ [HttpPost("GetStoreUsageStatistics")]
+ public async Task GetStoreUsageStatisticsAsync([FromBody] LqInventoryUsageStatisticsInput input)
+ {
+ try
+ {
+ var data = await _db.Queryable()
+ .LeftJoin((usage, product) => usage.ProductId == product.Id)
+ .LeftJoin((usage, product, store) => usage.StoreId == store.Id)
+ .Where((usage, product, store) => usage.UsageTime >= input.StartTime && usage.UsageTime <= input.EndTime)
+ .Where((usage, product, store) => usage.IsEffective == StatusEnum.有效.GetHashCode())
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), (usage, product, store) => usage.ProductId == input.ProductId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), (usage, product, store) => usage.StoreId == input.StoreId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), (usage, product, store) => product.ProductCategory == input.ProductCategory)
+ .GroupBy((usage, product, store) => new { usage.StoreId, store.RealName })
+ .Select((usage, product, store) => new StoreUsageStatisticsOutput
+ {
+ StoreId = usage.StoreId,
+ StoreName = store.RealName,
+ TotalUsageQuantity = SqlFunc.AggregateSum(usage.UsageQuantity),
+ TotalUsageAmount = SqlFunc.AggregateSum(usage.UsageQuantity * product.Price),
+ UsageCount = SqlFunc.AggregateCount(usage.Id),
+ ProductVarietyCount = SqlFunc.AggregateCount(usage.ProductId)
+ })
+ .ToListAsync();
+
+ return new
+ {
+ success = true,
+ data = data,
+ total = data.Count,
+ message = "门店使用统计查询成功"
+ };
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取门店使用统计失败");
+ throw NCCException.Oh($"获取门店使用统计失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 统计时间周期内使用趋势
+ ///
+ /// 统计时间周期内使用趋势
+ ///
+ /// 统计查询输入
+ /// 使用趋势统计
+ [HttpPost("GetUsageTrendStatistics")]
+ public async Task GetUsageTrendStatisticsAsync([FromBody] LqInventoryUsageStatisticsInput input)
+ {
+ try
+ {
+ // 先获取基础数据
+ var baseData = await _db.Queryable()
+ .LeftJoin((usage, product) => usage.ProductId == product.Id)
+ .Where((usage, product) => usage.UsageTime >= input.StartTime && usage.UsageTime <= input.EndTime)
+ .Where((usage, product) => usage.IsEffective == StatusEnum.有效.GetHashCode())
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), (usage, product) => usage.ProductId == input.ProductId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), (usage, product) => usage.StoreId == input.StoreId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), (usage, product) => product.ProductCategory == input.ProductCategory)
+ .Select((usage, product) => new
+ {
+ UsageTime = usage.UsageTime,
+ UsageQuantity = usage.UsageQuantity,
+ UsageAmount = usage.UsageQuantity * product.Price,
+ ProductId = usage.ProductId
+ })
+ .ToListAsync();
+
+ // 根据统计类型分组
+ var groupedData = input.StatisticsType switch
+ {
+ "日" => baseData.GroupBy(x => x.UsageTime.Date)
+ .Select(g => new UsageTrendStatisticsOutput
+ {
+ StatisticsDate = g.Key,
+ TotalUsageQuantity = g.Sum(x => x.UsageQuantity),
+ TotalUsageAmount = g.Sum(x => x.UsageAmount),
+ UsageCount = g.Count(),
+ ProductVarietyCount = g.Select(x => x.ProductId).Distinct().Count()
+ })
+ .OrderBy(x => x.StatisticsDate)
+ .ToList(),
+ "月" => baseData.GroupBy(x => new { x.UsageTime.Year, x.UsageTime.Month })
+ .Select(g => new UsageTrendStatisticsOutput
+ {
+ StatisticsDate = new DateTime(g.Key.Year, g.Key.Month, 1),
+ TotalUsageQuantity = g.Sum(x => x.UsageQuantity),
+ TotalUsageAmount = g.Sum(x => x.UsageAmount),
+ UsageCount = g.Count(),
+ ProductVarietyCount = g.Select(x => x.ProductId).Distinct().Count()
+ })
+ .OrderBy(x => x.StatisticsDate)
+ .ToList(),
+ _ => baseData.GroupBy(x => x.UsageTime.Date)
+ .Select(g => new UsageTrendStatisticsOutput
+ {
+ StatisticsDate = g.Key,
+ TotalUsageQuantity = g.Sum(x => x.UsageQuantity),
+ TotalUsageAmount = g.Sum(x => x.UsageAmount),
+ UsageCount = g.Count(),
+ ProductVarietyCount = g.Select(x => x.ProductId).Distinct().Count()
+ })
+ .OrderBy(x => x.StatisticsDate)
+ .ToList()
+ };
+
+ return new
+ {
+ success = true,
+ data = groupedData,
+ total = groupedData.Count,
+ message = "使用趋势统计查询成功"
+ };
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取使用趋势统计失败");
+ throw NCCException.Oh($"获取使用趋势统计失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 统计产品使用排行榜
+ ///
+ /// 统计产品使用排行榜
+ ///
+ /// 统计查询输入
+ /// 产品使用排行榜
+ [HttpPost("GetProductUsageRanking")]
+ public async Task GetProductUsageRankingAsync([FromBody] LqInventoryUsageStatisticsInput input)
+ {
+ try
+ {
+ var data = await _db.Queryable()
+ .LeftJoin((usage, product) => usage.ProductId == product.Id)
+ .Where((usage, product) => usage.UsageTime >= input.StartTime && usage.UsageTime <= input.EndTime)
+ .Where((usage, product) => usage.IsEffective == StatusEnum.有效.GetHashCode())
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), (usage, product) => usage.ProductId == input.ProductId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), (usage, product) => usage.StoreId == input.StoreId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), (usage, product) => product.ProductCategory == input.ProductCategory)
+ .GroupBy((usage, product) => new { usage.ProductId, product.ProductName, product.ProductCategory })
+ .Select((usage, product) => new ProductUsageRankingOutput
+ {
+ ProductId = usage.ProductId,
+ ProductName = product.ProductName,
+ ProductCategory = product.ProductCategory,
+ TotalUsageQuantity = SqlFunc.AggregateSum(usage.UsageQuantity),
+ TotalUsageAmount = SqlFunc.AggregateSum(usage.UsageQuantity * product.Price),
+ UsageCount = SqlFunc.AggregateCount(usage.Id),
+ StoreCount = SqlFunc.AggregateCount(usage.StoreId)
+ })
+ .OrderBy("TotalUsageQuantity desc")
+ .Take(input.RankingCount)
+ .ToListAsync();
+
+ // 添加排名
+ for (int i = 0; i < data.Count; i++)
+ {
+ data[i].Ranking = i + 1;
+ }
+
+ return new
+ {
+ success = true,
+ data = data,
+ total = data.Count,
+ message = "产品使用排行榜查询成功"
+ };
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取产品使用排行榜失败");
+ throw NCCException.Oh($"获取产品使用排行榜失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
index 9504739..a58c258 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
@@ -5,6 +5,7 @@ using System.Net.Http;
using System.Threading.Tasks;
using Mapster;
using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
using NCC.ClayObject;
using NCC.Common.Configuration;
using NCC.Common.Core.Manager;
@@ -22,6 +23,8 @@ using NCC.Extend.Entitys.Dto.LqKdKdjlb;
using NCC.Extend.Entitys.Enum;
using NCC.Extend.Entitys.lq_hytk_hytk;
using NCC.Extend.Entitys.lq_hytk_mx;
+using NCC.Extend.Entitys.lq_hytk_jksyj;
+using NCC.Extend.Entitys.lq_hytk_kjbsyj;
using NCC.Extend.Entitys.lq_jinsanjiao_user;
using NCC.Extend.Entitys.lq_kd_deductinfo;
using NCC.Extend.Entitys.lq_xh_hyhk;
@@ -58,6 +61,7 @@ namespace NCC.Extend.LqKdKdjlb
private readonly IUserManager _userManager;
private readonly WeChatBotService _weChatBotService;
private readonly LqKdKdjlbStringGenerator _stringGenerator;
+ private readonly ILogger _logger;
///
/// 初始化一个类型的新实例
@@ -69,7 +73,8 @@ namespace NCC.Extend.LqKdKdjlb
ISqlSugarRepository lqKdPxmxRepository,
IUserManager userManager,
WeChatBotService weChatBotService,
- LqKdKdjlbStringGenerator stringGenerator
+ LqKdKdjlbStringGenerator stringGenerator,
+ ILogger logger
)
{
_lqKdKdjlbRepository = lqKdKdjlbRepository;
@@ -80,6 +85,7 @@ namespace NCC.Extend.LqKdKdjlb
_userManager = userManager;
_weChatBotService = weChatBotService;
_stringGenerator = stringGenerator;
+ _logger = logger;
}
#region 获取开单记录表
@@ -2310,6 +2316,389 @@ namespace NCC.Extend.LqKdKdjlb
}
#endregion
+ #region 会员转卡操作
+ ///
+ /// 会员转卡操作
+ ///
+ ///
+ /// 转卡是指一个会员把自己剩余的某些品项,转给另外一个会员
+ /// 转卡会员转出的品项,就做退卡操作
+ /// 被转卡会员收到的品项,做开卡操作
+ ///
+ /// 示例请求:
+ /// ```json
+ /// {
+ /// "fromMemberId": "member001",
+ /// "toMemberId": "member002",
+ /// "storeId": "store001",
+ /// "signatureFile": "签名文件路径",
+ /// "remarks": "转卡备注",
+ /// "transferItems": [
+ /// {
+ /// "billingItemId": "item001",
+ /// "transferQuantity": 5,
+ /// "itemId": "px001",
+ /// "itemName": "美容项目",
+ /// "itemPrice": 100.00,
+ /// "sourceType": "转卡",
+ /// "healthTeacherPerformances": [
+ /// {
+ /// "healthTeacherId": "jks001",
+ /// "healthTeacherName": "张医生",
+ /// "healthTeacherAccount": "zhang001",
+ /// "performanceAmount": 50.00,
+ /// "laborCost": 20.00,
+ /// "itemQuantity": 5
+ /// }
+ /// ],
+ /// "techTeacherPerformances": [
+ /// {
+ /// "techTeacherId": "kjbs001",
+ /// "techTeacherName": "李老师",
+ /// "techTeacherAccount": "li001",
+ /// "performanceAmount": 30.00,
+ /// "laborCost": 10.00,
+ /// "itemQuantity": 5
+ /// }
+ /// ]
+ /// }
+ /// ]
+ /// }
+ /// ```
+ ///
+ /// 参数说明:
+ /// - fromMemberId: 转出会员ID
+ /// - toMemberId: 转入会员ID
+ /// - storeId: 门店ID
+ /// - signatureFile: 转出会员签名
+ /// - remarks: 转卡备注
+ /// - transferItems: 转出品项列表
+ /// - billingItemId: 开单品项明细ID
+ /// - transferQuantity: 转出数量
+ /// - itemId: 品项ID
+ /// - itemName: 品项名称
+ /// - itemPrice: 品项价格
+ /// - sourceType: 来源类型
+ /// - healthTeacherPerformances: 健康师业绩列表
+ /// - healthTeacherId: 健康师ID
+ /// - healthTeacherName: 健康师姓名
+ /// - healthTeacherAccount: 健康师账号
+ /// - performanceAmount: 业绩金额
+ /// - laborCost: 人工成本
+ /// - itemQuantity: 品项数量
+ /// - techTeacherPerformances: 科技部老师业绩列表
+ /// - techTeacherId: 科技部老师ID
+ /// - techTeacherName: 科技部老师姓名
+ /// - techTeacherAccount: 科技部老师账号
+ /// - performanceAmount: 业绩金额
+ /// - laborCost: 人工成本
+ /// - itemQuantity: 品项数量
+ ///
+ /// 转卡输入参数
+ /// 转卡结果
+ /// 转卡成功
+ /// 参数错误或业务规则验证失败
+ /// 服务器错误
+ [HttpPost("TransferCard")]
+ public async Task TransferCard([FromBody] TransferCardInput input)
+ {
+ if (input == null)
+ {
+ throw NCCException.Oh("转卡参数不能为空");
+ }
+
+ var userInfo = await _userManager.GetUserInfo();
+ var transferTime = DateTime.Now;
+
+ try
+ {
+ // 开启事务
+ _db.BeginTran();
+
+ // 1. 验证转出和转入会员是否存在
+ var fromMember = await _db.Queryable().Where(x => x.Id == input.FromMemberId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync();
+ if (fromMember == null)
+ {
+ throw NCCException.Oh("转出会员不存在或已失效");
+ }
+ var toMember = await _db.Queryable().Where(x => x.Id == input.ToMemberId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync();
+ if (toMember == null)
+ {
+ throw NCCException.Oh("转入会员不存在或已失效");
+ }
+
+ // 2. 验证转出品项的余额是否足够
+ foreach (var item in input.TransferItems)
+ {
+ var billingItem = await _db.Queryable().Where(x => x.Id == item.BillingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync();
+ if (billingItem == null)
+ {
+ throw NCCException.Oh($"品项明细不存在:{item.ItemName}");
+ }
+
+ // 查询剩余数量
+ var remainingCount = await GetItemRemainingCount(item.BillingItemId);
+ if (remainingCount < item.TransferQuantity)
+ {
+ throw NCCException.Oh($"品项 {item.ItemName} 剩余数量不足,当前剩余:{remainingCount},需要转出:{item.TransferQuantity}");
+ }
+ }
+
+ // 3. 创建退卡记录(转出方)
+ var refundId = YitIdHelper.NextId().ToString();
+ var refundEntity = new LqHytkHytkEntity
+ {
+ Id = refundId,
+ F_CreateTime = transferTime,
+ F_CreateUser = userInfo.userId,
+ IsEffective = StatusEnum.有效.GetHashCode(),
+ Czry = userInfo.userId,
+ Hy = input.FromMemberId,
+ Hymc = fromMember.Khmc,
+ Md = input.StoreId,
+ SignatureFile = input.SignatureFile,
+ Tkje = input.TransferItems.Sum(x => x.ItemPrice * x.TransferQuantity),
+ Tkyy = "转卡",
+ Bz = $"转卡给会员:{toMember.Khmc},{input.Remarks}"
+ };
+ await _db.Insertable(refundEntity).ExecuteCommandAsync();
+
+ // 4. 创建退卡品项明细和业绩记录
+ var refundMxEntities = new List();
+ var refundJksyjEntities = new List();
+ var refundKjbsyjEntities = new List();
+
+ foreach (var item in input.TransferItems)
+ {
+ var refundMxEntity = new LqHytkMxEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ RefundInfoId = refundId,
+ BillingItemId = item.BillingItemId,
+ CreateTime = transferTime,
+ CreateUser = userInfo.userId,
+ Px = item.ItemId,
+ Pxmc = item.ItemName,
+ Pxjg = item.ItemPrice,
+ Tkje = item.ItemPrice * item.TransferQuantity,
+ ProjectNumber = item.TransferQuantity,
+ SourceType = item.SourceType,
+ TotalPrice = item.ItemPrice * item.TransferQuantity,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ };
+ refundMxEntities.Add(refundMxEntity);
+
+ // 创建退卡健康师业绩记录
+ if (item.HealthTeacherPerformances != null && item.HealthTeacherPerformances.Any())
+ {
+ foreach (var jks in item.HealthTeacherPerformances)
+ {
+ refundJksyjEntities.Add(new LqHytkJksyjEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ Gltkbh = refundId,
+ Jks = jks.HealthTeacherId,
+ Jksxm = jks.HealthTeacherName,
+ Jkszh = jks.HealthTeacherAccount,
+ Jksyj = jks.PerformanceAmount,
+ Tksj = transferTime,
+ F_jsjid = jks.HealthTeacherId,
+ F_tkpxid = refundMxEntity.Id,
+ F_LaborCost = jks.LaborCost,
+ F_tkpxNumber = jks.ItemQuantity,
+ F_CreateTime = transferTime,
+ F_CreateUser = userInfo.userId,
+ CardReturn = refundMxEntity.Id,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ });
+ }
+ }
+
+ // 创建退卡科技部老师业绩记录
+ if (item.TechTeacherPerformances != null && item.TechTeacherPerformances.Any())
+ {
+ foreach (var kjbs in item.TechTeacherPerformances)
+ {
+ refundKjbsyjEntities.Add(new LqHytkKjbsyjEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ Gltkbh = refundId,
+ Kjbls = kjbs.TechTeacherId,
+ Kjblsxm = kjbs.TechTeacherName,
+ Kjblszh = kjbs.TechTeacherAccount,
+ Kjblsyj = kjbs.PerformanceAmount,
+ Tksj = transferTime,
+ F_tkpxid = refundMxEntity.Id,
+ F_LaborCost = kjbs.LaborCost,
+ F_tkpxNumber = kjbs.ItemQuantity,
+ F_CreateTime = transferTime,
+ F_CreateUser = userInfo.userId,
+ CardReturn = refundMxEntity.Id,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ });
+ }
+ }
+ }
+
+ await _db.Insertable(refundMxEntities).ExecuteCommandAsync();
+ if (refundJksyjEntities.Any())
+ {
+ await _db.Insertable(refundJksyjEntities).ExecuteCommandAsync();
+ }
+ if (refundKjbsyjEntities.Any())
+ {
+ await _db.Insertable(refundKjbsyjEntities).ExecuteCommandAsync();
+ }
+
+ // 5. 创建开卡记录(转入方)
+ var billingId = YitIdHelper.NextId().ToString();
+ var billingEntity = new LqKdKdjlbEntity
+ {
+ Id = billingId,
+ CreateTime = transferTime,
+ UpdateTime = transferTime,
+ IsEffective = StatusEnum.有效.GetHashCode(),
+ CreateUser = userInfo.userId,
+ Kdhy = input.ToMemberId,
+ Djmd = input.StoreId,
+ Sfyj = input.TransferItems.Sum(x => x.ItemPrice * x.TransferQuantity),
+ Bz = $"从会员 {fromMember.Khmc} 转入,{input.Remarks}"
+ };
+ await _db.Insertable(billingEntity).ExecuteCommandAsync();
+ // 6. 创建开单品项明细和业绩记录
+ var billingPxmxEntities = new List();
+ var billingJksyjEntities = new List();
+ var billingKjbsyjEntities = new List();
+
+ foreach (var item in input.TransferItems)
+ {
+ var billingPxmxEntity = new LqKdPxmxEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ Glkdbh = billingId,
+ Px = item.ItemId,
+ Pxmc = item.ItemName,
+ Pxjg = item.ItemPrice,
+ MemberId = input.ToMemberId,
+ CreateTIme = transferTime,
+ ProjectNumber = item.TransferQuantity,
+ IsEnabled = StatusEnum.有效.GetHashCode(),
+ SourceType = item.SourceType,
+ TotalPrice = item.ItemPrice * item.TransferQuantity,
+ ActualPrice = item.ItemPrice * item.TransferQuantity,
+ IsEffective = StatusEnum.有效.GetHashCode(),
+ Remark = $"从会员 {fromMember.Khmc} 转入"
+ };
+ billingPxmxEntities.Add(billingPxmxEntity);
+
+ // 创建开卡健康师业绩记录
+ if (item.HealthTeacherPerformances != null && item.HealthTeacherPerformances.Any())
+ {
+ foreach (var jks in item.HealthTeacherPerformances)
+ {
+ billingJksyjEntities.Add(new LqKdJksyjEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ Glkdbh = billingId,
+ Jks = jks.HealthTeacherId,
+ Jksxm = jks.HealthTeacherName,
+ Jkszh = jks.HealthTeacherAccount,
+ Jksyj = jks.PerformanceAmount.ToString(),
+ Yjsj = transferTime,
+ Jsj_id = jks.HealthTeacherId,
+ Kdpxid = billingPxmxEntity.Id,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ });
+ }
+ }
+
+ // 创建开卡科技部老师业绩记录
+ if (item.TechTeacherPerformances != null && item.TechTeacherPerformances.Any())
+ {
+ foreach (var kjbs in item.TechTeacherPerformances)
+ {
+ billingKjbsyjEntities.Add(new LqKdKjbsyjEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ Glkdbh = billingId,
+ Kjbls = kjbs.TechTeacherId,
+ Kjblsxm = kjbs.TechTeacherName,
+ Kjblszh = kjbs.TechTeacherAccount,
+ Kjblsyj = kjbs.PerformanceAmount.ToString(),
+ Yjsj = transferTime,
+ Kdpxid = billingPxmxEntity.Id,
+ LaborCost = kjbs.LaborCost,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ });
+ }
+ }
+ }
+
+ await _db.Insertable(billingPxmxEntities).ExecuteCommandAsync();
+ if (billingJksyjEntities.Any())
+ {
+ await _db.Insertable(billingJksyjEntities).ExecuteCommandAsync();
+ }
+ if (billingKjbsyjEntities.Any())
+ {
+ await _db.Insertable(billingKjbsyjEntities).ExecuteCommandAsync();
+ }
+ // 提交事务
+ _db.CommitTran();
+
+ return new TransferCardOutput
+ {
+ Success = true,
+ TransferId = refundId,
+ RefundId = refundId,
+ BillingId = billingId,
+ TotalAmount = input.TransferItems.Sum(x => x.ItemPrice * x.TransferQuantity),
+ TotalQuantity = input.TransferItems.Sum(x => x.TransferQuantity),
+ FromMemberName = fromMember.Khmc,
+ ToMemberName = toMember.Khmc,
+ TransferTime = transferTime,
+ Message = "转卡操作成功"
+ };
+ }
+ catch (Exception ex)
+ {
+ _db.RollbackTran();
+ _logger.LogError(ex, "转卡操作失败:{Message}", ex.Message);
+ throw NCCException.Oh($"转卡操作失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 获取品项剩余数量
+ ///
+ /// 获取品项剩余数量
+ ///
+ /// 开单品项明细ID
+ /// 剩余数量
+ private async Task GetItemRemainingCount(string billingItemId)
+ {
+ try
+ {
+ // 查询购买数量
+ var purchasedCount = await _db.Queryable().Where(x => x.Id == billingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).Select(x => x.ProjectNumber).FirstAsync();
+ // 查询消费数量
+ var consumedCount = await _db.Queryable().Where(x => x.BillingItemId == billingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).SumAsync(x => x.ProjectNumber);
+ // 查询退卡数量
+ var refundedCount = await _db.Queryable().Where(x => x.BillingItemId == billingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).SumAsync(x => x.ProjectNumber);
+ // 查询储扣数量
+ var deductCount = await _db.Queryable().Where(x => x.DeductId == billingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).SumAsync(x => x.ProjectNumber);
+ // 计算剩余数量
+ var remainingCount = (int)(purchasedCount - consumedCount - refundedCount - deductCount);
+ return Math.Max(0, remainingCount); // 确保不为负数
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取品项剩余数量失败,品项ID:{BillingItemId}", billingItemId);
+ throw NCCException.Oh($"获取品项剩余数量失败:{ex.Message}");
+ }
+ }
+ #endregion
+
}
}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqStudyClassService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqStudyClassService.cs
new file mode 100644
index 0000000..18e738d
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqStudyClassService.cs
@@ -0,0 +1,411 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using NCC.Common.Core.Manager;
+using NCC.Common.Enum;
+using NCC.Common.Filter;
+using NCC.Dependency;
+using NCC.DynamicApiController;
+using NCC.Extend.Entitys.Dto.LqStudyClass;
+using NCC.Extend.Entitys.lq_study_class;
+using NCC.Extend.Entitys.lq_study_student;
+using NCC.Extend.Entitys.lq_study_record;
+using NCC.Extend.Interfaces.LqStudyClass;
+using NCC.FriendlyException;
+using NCC.System.Entitys.Permission;
+using SqlSugar;
+using Yitter.IdGenerator;
+using NCC.Extend.Entitys.Enum;
+
+namespace NCC.Extend
+{
+ ///
+ /// 学习班级服务
+ ///
+ [ApiDescriptionSettings(Tag = "绿纤学习班级管理", Name = "LqStudyClass", Order = 200)]
+ [Route("api/Extend/LqStudyClass")]
+ public class LqStudyClassService : IDynamicApiController, ITransient, ILqStudyClassService
+ {
+ private readonly IUserManager _userManager;
+ private readonly ILogger _logger;
+ private readonly ISqlSugarClient _db;
+
+ ///
+ /// 构造函数
+ ///
+ /// 用户管理器
+ /// 日志记录器
+ /// 数据库客户端
+ public LqStudyClassService(IUserManager userManager, ILogger logger, ISqlSugarClient db)
+ {
+ _userManager = userManager;
+ _logger = logger;
+ _db = db;
+ }
+
+ #region 创建学习班级并添加学员
+ ///
+ /// 创建学习班级并添加学员
+ ///
+ /// 创建输入
+ /// 创建结果
+ [HttpPost("CreateClassWithStudents")]
+ public async Task CreateClassWithStudentsAsync([FromBody] LqStudyClassCreateWithStudentsInput input)
+ {
+ try
+ {
+ _db.Ado.BeginTran();
+
+ // 创建班级
+ var classId = YitIdHelper.NextId().ToString();
+ var classEntity = new LqStudyClassEntity
+ {
+ Id = classId,
+ ClassName = input.ClassName,
+ TeacherId = input.TeacherId,
+ StartTime = input.StartTime,
+ EndTime = input.EndTime,
+ Remark = input.Remark,
+ CreateUser = _userManager.UserId,
+ CreateTime = DateTime.Now,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ };
+
+ await _db.Insertable(classEntity).ExecuteCommandAsync();
+
+ // 创建学员
+ var studentEntities = new List();
+ foreach (var student in input.Students)
+ {
+ var studentEntity = new LqStudyStudentEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ EmployeeName = student.EmployeeName,
+ EmployeePhone = student.EmployeePhone,
+ EmployeeId = student.EmployeeId,
+ AdmissionTime = student.AdmissionTime,
+ ClassId = classId,
+ ClassName = input.ClassName,
+ HrBelong = student.HrBelong,
+ CreateUser = _userManager.UserId,
+ CreateTime = DateTime.Now,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ };
+ studentEntities.Add(studentEntity);
+ }
+
+ if (studentEntities.Any())
+ {
+ await _db.Insertable(studentEntities).ExecuteCommandAsync();
+ }
+
+ _db.Ado.CommitTran();
+
+ return new
+ {
+ success = true,
+ data = new
+ {
+ classId = classId,
+ className = input.ClassName,
+ studentCount = studentEntities.Count,
+ message = $"成功创建班级'{input.ClassName}'并添加{studentEntities.Count}名学员"
+ },
+ message = "创建成功"
+ };
+ }
+ catch (Exception ex)
+ {
+ _db.Ado.RollbackTran();
+ _logger.LogError(ex, "创建学习班级并添加学员失败");
+ throw NCCException.Oh($"创建失败:{ex.Message}");
+ }
+ }
+
+ #endregion
+
+ #region 向现有班级添加学员
+ ///
+ /// 向现有班级添加学员
+ ///
+ /// 添加学员输入
+ /// 添加结果
+ [HttpPost("AddStudentsToClass")]
+ public async Task AddStudentsToClassAsync([FromBody] LqStudyClassAddStudentsInput input)
+ {
+ try
+ {
+ // 验证班级是否存在
+ var classInfo = await _db.Queryable()
+ .Where(x => x.Id == input.ClassId && x.IsEffective == StatusEnum.有效.GetHashCode())
+ .FirstAsync();
+
+ if (classInfo == null)
+ {
+ throw NCCException.Oh("班级不存在或已失效");
+ }
+
+ _db.Ado.BeginTran();
+
+ // 创建学员
+ var studentEntities = new List();
+ foreach (var student in input.Students)
+ {
+ var studentEntity = new LqStudyStudentEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ EmployeeName = student.EmployeeName,
+ EmployeePhone = student.EmployeePhone,
+ EmployeeId = student.EmployeeId,
+ AdmissionTime = student.AdmissionTime,
+ ClassId = input.ClassId,
+ ClassName = classInfo.ClassName,
+ HrBelong = student.HrBelong,
+ CreateUser = _userManager.UserId,
+ CreateTime = DateTime.Now,
+ IsEffective = StatusEnum.有效.GetHashCode()
+ };
+ studentEntities.Add(studentEntity);
+ }
+
+ if (studentEntities.Any())
+ {
+ await _db.Insertable(studentEntities).ExecuteCommandAsync();
+ }
+
+ _db.Ado.CommitTran();
+
+ return new
+ {
+ classId = input.ClassId,
+ className = classInfo.ClassName,
+ addedStudentCount = studentEntities.Count,
+ message = $"成功向班级'{classInfo.ClassName}'添加{studentEntities.Count}名学员"
+ };
+ }
+ catch (Exception ex)
+ {
+ _db.Ado.RollbackTran();
+ _logger.LogError(ex, "向班级添加学员失败");
+ throw NCCException.Oh($"添加失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 获取所有班级列表
+ ///
+ /// 获取所有班级列表
+ ///
+ /// 查询输入
+ /// 班级列表
+ [HttpGet("GetClassList")]
+ public async Task GetClassListAsync([FromQuery] LqStudyClassListQueryInput input)
+ {
+ try
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+
+ // 查询班级信息
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrWhiteSpace(input.ClassName), x => x.ClassName.Contains(input.ClassName))
+ .WhereIF(!string.IsNullOrWhiteSpace(input.TeacherId), x => x.TeacherId == input.TeacherId)
+ .WhereIF(input.StartTime.HasValue, x => x.StartTime >= input.StartTime.Value)
+ .WhereIF(input.EndTime.HasValue, x => x.StartTime <= input.EndTime.Value)
+ .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value)
+ .Select(x => new LqStudyClassListOutput
+ {
+ id = x.Id,
+ className = x.ClassName,
+ teacherId = x.TeacherId,
+ teacherName = SqlFunc.Subqueryable().Where(u => u.Id == x.TeacherId).Select(u => u.RealName),
+ startTime = x.StartTime,
+ endTime = x.EndTime,
+ remark = x.Remark,
+ })
+ .MergeTable()
+ .OrderBy(sidx + " " + input.sort)
+ .ToPagedListAsync(input.currentPage, input.pageSize);
+ return PageResult.SqlSugarPageResult(data);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取班级列表失败");
+ throw NCCException.Oh($"获取班级列表失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 获取班级下所有学员信息
+ ///
+ /// 获取班级下所有学员信息(分页)
+ ///
+ /// 查询输入
+ /// 学员列表
+ [HttpGet("GetStudentListByClassId")]
+ public async Task GetStudentListByClassIdAsync([FromQuery] LqStudyStudentListQueryInput input)
+ {
+ try
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+ // 查询学员信息
+ var data = await _db.Queryable()
+ .Where(x => x.ClassId == input.ClassId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeeName), x => x.EmployeeName.Contains(input.EmployeeName))
+ .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeePhone), x => x.EmployeePhone.Contains(input.EmployeePhone))
+ .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeeId), x => x.EmployeeId == input.EmployeeId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.HrBelong), x => x.HrBelong.Contains(input.HrBelong))
+ .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value)
+ .Select(x => new LqStudyStudentListOutput
+ {
+ id = x.Id,
+ employeeName = SqlFunc.Subqueryable().Where(u => u.Id == x.EmployeeId).Select(u => u.RealName),
+ employeePhone = SqlFunc.Subqueryable().Where(u => u.Id == x.EmployeeId).Select(u => u.MobilePhone),
+ employeeId = x.EmployeeId,
+ admissionTime = x.AdmissionTime,
+ classId = x.ClassId,
+ className = x.ClassName
+ })
+ .MergeTable()
+ .OrderBy(sidx + " " + input.sort)
+ .ToPagedListAsync(input.currentPage, input.pageSize);
+ return PageResult.SqlSugarPageResult(data);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取班级学员列表失败");
+ throw NCCException.Oh($"获取班级学员列表失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 学习记录管理
+ ///
+ /// 添加学习记录
+ ///
+ /// 学习记录输入
+ /// 添加结果
+ [HttpPost("AddStudyRecord")]
+ public async Task AddStudyRecordAsync([FromBody] LqStudyRecordCreateInput input)
+ {
+ // 验证员工是否存在
+ var employee = await _db.Queryable()
+ .Where(x => x.Id == input.EmployeeId && x.RealName == input.EmployeeName)
+ .FirstAsync();
+
+ if (employee == null)
+ {
+ throw NCCException.Oh("员工不存在,请检查员工ID和姓名是否正确");
+ }
+
+ // 如果选择下店协助,验证门店信息
+ if (input.IsStoreAssist == 1)
+ {
+ if (string.IsNullOrWhiteSpace(input.StoreId) || string.IsNullOrWhiteSpace(input.StoreName))
+ {
+ throw NCCException.Oh("选择下店协助时,门店ID和门店名称不能为空");
+ }
+ }
+ // 创建学习记录
+ var recordEntity = new LqStudyRecordEntity
+ {
+ Id = YitIdHelper.NextId().ToString(),
+ EmployeeName = input.EmployeeName,
+ EmployeeId = input.EmployeeId,
+ StudyType = input.StudyType,
+ TransportFee = input.TransportFee,
+ StudyDate = input.StudyDate,
+ DailyStatus = input.DailyStatus,
+ Remark = input.Remark,
+ IsStoreAssist = input.IsStoreAssist,
+ StoreId = input.IsStoreAssist == 1 ? input.StoreId : null,
+ StoreName = input.IsStoreAssist == 1 ? input.StoreName : null,
+ CreateUser = _userManager.UserId,
+ CreateTime = DateTime.Now,
+ IsEffective = 1
+ };
+ var isOk = await _db.Insertable(recordEntity).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
+ }
+ #endregion
+
+ #region 获取学习记录列表
+ ///
+ /// 获取学习记录列表
+ ///
+ /// 查询输入
+ /// 学习记录列表
+ [HttpGet("GetStudyRecordList")]
+ public async Task GetStudyRecordListAsync([FromQuery] LqStudyRecordListQueryInput input)
+ {
+ try
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+
+ // 查询学习记录信息
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeeName), x => x.EmployeeName.Contains(input.EmployeeName))
+ .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeeId), x => x.EmployeeId == input.EmployeeId)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.StudyType), x => x.StudyType.Contains(input.StudyType))
+ .WhereIF(input.StudyDateStart.HasValue, x => x.StudyDate >= input.StudyDateStart.Value)
+ .WhereIF(input.StudyDateEnd.HasValue, x => x.StudyDate <= input.StudyDateEnd.Value)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.DailyStatus), x => x.DailyStatus.Contains(input.DailyStatus))
+ .WhereIF(input.IsStoreAssist.HasValue, x => x.IsStoreAssist == input.IsStoreAssist.Value)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), x => x.StoreId == input.StoreId)
+ .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value)
+ .Select(x => new LqStudyRecordListOutput
+ {
+ id = x.Id,
+ employeeName = x.EmployeeName,
+ employeeId = x.EmployeeId,
+ studyType = x.StudyType,
+ transportFee = x.TransportFee,
+ studyDate = x.StudyDate,
+ dailyStatus = x.DailyStatus,
+ remark = x.Remark,
+ isStoreAssist = x.IsStoreAssist,
+ storeId = x.StoreId,
+ storeName = x.StoreName,
+ createUser = x.CreateUser,
+ createUserName = SqlFunc.Subqueryable().Where(u => u.Id == x.CreateUser).Select(u => u.RealName),
+ createTime = x.CreateTime,
+ updateUser = x.UpdateUser,
+ updateUserName = SqlFunc.Subqueryable().Where(u => u.Id == x.UpdateUser).Select(u => u.RealName),
+ updateTime = x.UpdateTime,
+ isEffective = x.IsEffective
+ })
+ .MergeTable()
+ .OrderBy(sidx + " " + input.sort)
+ .ToPagedListAsync(input.currentPage, input.pageSize);
+ return PageResult.SqlSugarPageResult(data);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取学习记录列表失败");
+ throw NCCException.Oh($"获取学习记录列表失败:{ex.Message}");
+ }
+ }
+ #endregion
+
+ #region 作废学习记录
+ ///
+ /// 作废学习记录
+ ///
+ /// 学习记录ID
+ /// 作废结果
+ [HttpPost("CancelStudyRecord")]
+ public async Task CancelStudyRecordAsync([FromBody] string id)
+ {
+ var record = await _db.Queryable().Where(x => x.Id == id).FirstAsync();
+ if (record == null) throw NCCException.Oh("学习记录不存在");
+ record.IsEffective = StatusEnum.无效.GetHashCode();
+ record.UpdateTime = DateTime.Now;
+ record.UpdateUser = _userManager.UserId;
+ var isOk = await _db.Updateable(record).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
+ }
+ #endregion
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqYcsdDysbmxbService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqYcsdDysbmxbService.cs
index 6048ee4..75cd737 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend/LqYcsdDysbmxbService.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqYcsdDysbmxbService.cs
@@ -28,7 +28,7 @@ namespace NCC.Extend.LqYcsdDysbmxb
///
/// 当月社保明细表服务
///
- [ApiDescriptionSettings(Tag = "Extend",Name = "LqYcsdDysbmxb", Order = 200)]
+ [ApiDescriptionSettings(Tag = "Extend", Name = "LqYcsdDysbmxb", Order = 200)]
[Route("api/Extend/[controller]")]
public class LqYcsdDysbmxbService : ILqYcsdDysbmxbService, IDynamicApiController, ITransient
{
@@ -43,7 +43,7 @@ namespace NCC.Extend.LqYcsdDysbmxb
ISqlSugarRepository lqYcsdDysbmxbRepository,
IUserManager userManager)
{
- _lqYcsdDysbmxbRepository = lqYcsdDysbmxbRepository;
+ _lqYcsdDysbmxbRepository = lqYcsdDysbmxbRepository;
_db = _lqYcsdDysbmxbRepository.Context;
_userManager = userManager;
}
@@ -84,23 +84,23 @@ namespace NCC.Extend.LqYcsdDysbmxb
.WhereIF(!string.IsNullOrEmpty(input.zj), p => p.Zj.Equals(input.zj))
.WhereIF(!string.IsNullOrEmpty(input.gzk), p => p.Gzk.Equals(input.gzk))
.WhereIF(!string.IsNullOrEmpty(input.cb), p => p.Cb.Equals(input.cb))
- .Select(it=> new LqYcsdDysbmxbListOutput
+ .Select(it => new LqYcsdDysbmxbListOutput
{
id = it.Id,
- xm=it.Xm,
- md1=it.Md1,
- md2=it.Md2,
- gmmd=it.Gmmd,
- hxcb=it.Hxcb,
- cbyf=it.Cbyf,
- yf=it.Yf,
- sb=it.Sb,
- yb=it.Yb,
- zj=it.Zj,
- gzk=it.Gzk,
- cb=it.Cb,
- }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
- return PageResult.SqlSugarPageResult(data);
+ xm = it.Xm,
+ md1 = it.Md1,
+ md2 = it.Md2,
+ gmmd = it.Gmmd,
+ hxcb = it.Hxcb,
+ cbyf = it.Cbyf,
+ yf = it.Yf,
+ sb = it.Sb,
+ yb = it.Yb,
+ zj = it.Zj,
+ gzk = it.Gzk,
+ cb = it.Cb,
+ }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
+ return PageResult.SqlSugarPageResult(data);
}
///
@@ -141,23 +141,23 @@ namespace NCC.Extend.LqYcsdDysbmxb
.WhereIF(!string.IsNullOrEmpty(input.zj), p => p.Zj.Equals(input.zj))
.WhereIF(!string.IsNullOrEmpty(input.gzk), p => p.Gzk.Equals(input.gzk))
.WhereIF(!string.IsNullOrEmpty(input.cb), p => p.Cb.Equals(input.cb))
- .Select(it=> new LqYcsdDysbmxbListOutput
+ .Select(it => new LqYcsdDysbmxbListOutput
{
id = it.Id,
- xm=it.Xm,
- md1=it.Md1,
- md2=it.Md2,
- gmmd=it.Gmmd,
- hxcb=it.Hxcb,
- cbyf=it.Cbyf,
- yf=it.Yf,
- sb=it.Sb,
- yb=it.Yb,
- zj=it.Zj,
- gzk=it.Gzk,
- cb=it.Cb,
- }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync();
- return data;
+ xm = it.Xm,
+ md1 = it.Md1,
+ md2 = it.Md2,
+ gmmd = it.Gmmd,
+ hxcb = it.Hxcb,
+ cbyf = it.Cbyf,
+ yf = it.Yf,
+ sb = it.Sb,
+ yb = it.Yb,
+ zj = it.Zj,
+ gzk = it.Gzk,
+ cb = it.Cb,
+ }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync();
+ return data;
}
///
@@ -179,7 +179,7 @@ namespace NCC.Extend.LqYcsdDysbmxb
{
exportData = await this.GetNoPagingList(input);
}
- List paramList = "[{\"value\":\"序号\",\"field\":\"id\"},{\"value\":\"姓名\",\"field\":\"xm\"},{\"value\":\"门店1\",\"field\":\"md1\"},{\"value\":\"门店2\",\"field\":\"md2\"},{\"value\":\"购买门店\",\"field\":\"gmmd\"},{\"value\":\"后续参保\",\"field\":\"hxcb\"},{\"value\":\"参保月份\",\"field\":\"cbyf\"},{\"value\":\"月份\",\"field\":\"yf\"},{\"value\":\"社保\",\"field\":\"sb\"},{\"value\":\"医保\",\"field\":\"yb\"},{\"value\":\"总计\",\"field\":\"zj\"},{\"value\":\"工资扣\",\"field\":\"gzk\"},{\"value\":\"成本\",\"field\":\"cb\"},]".ToList();
+ List paramList = "[{\"value\":\"序号\",\"field\":\"id\"},{\"value\":\"姓名\",\"field\":\"xm\"},{\"value\":\"门店1\",\"field\":\"md1\"},{\"value\":\"门店2\",\"field\":\"md2\"},{\"value\":\"购买门店\",\"field\":\"gmmd\"},{\"value\":\"后续参保\",\"field\":\"hxcb\"},{\"value\":\"参保月份\",\"field\":\"cbyf\"},{\"value\":\"月份\",\"field\":\"yf\"},{\"value\":\"社保\",\"field\":\"sb\"},{\"value\":\"医保\",\"field\":\"yb\"},{\"value\":\"总计\",\"field\":\"zj\"},{\"value\":\"工资扣\",\"field\":\"gzk\"},{\"value\":\"成本\",\"field\":\"cb\"},]".ToList();
ExcelConfig excelconfig = new ExcelConfig();
excelconfig.FileName = "当月社保明细表.xls";
excelconfig.HeadFont = "微软雅黑";
@@ -222,7 +222,7 @@ namespace NCC.Extend.LqYcsdDysbmxb
//开启事务
_db.BeginTran();
//批量删除当月社保明细表
- await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync();
+ await _db.Deleteable().In(d => d.Id, ids).ExecuteCommandAsync();
//关闭事务
_db.CommitTran();
}