Commit 88610eda0a6f18974a4712bf7e8a709ab1c00ccb
1 parent
c57c36d2
feat: 实现转卡接口和库存管理功能
- 新增转卡接口,支持会员品项转移 - 转卡操作同时处理退卡和开卡记录 - 支持健康师和科技部老师业绩数据处理 - 新增库存管理和库存使用记录功能 - 新增学习班级和学习记录管理功能 - 删除CommonStatus枚举,统一使用StatusEnum - 完善转卡接口的XML文档和示例
Showing
50 changed files
with
4756 additions
and
65 deletions
netcore/src/Modularity/Common/NCC.Common/Enum/CommonStatus.cs deleted
| 1 | -using NCC.Dependency; | |
| 2 | -using System.ComponentModel; | |
| 3 | - | |
| 4 | -namespace NCC.Common.Enum | |
| 5 | -{ | |
| 6 | - /// <summary> | |
| 7 | - /// 公共状态 | |
| 8 | - /// </summary> | |
| 9 | - [SuppressSniffer] | |
| 10 | - public enum CommonStatus | |
| 11 | - { | |
| 12 | - /// <summary> | |
| 13 | - /// 正常 | |
| 14 | - /// </summary> | |
| 15 | - [Description("正常")] | |
| 16 | - ENABLE = 0, | |
| 17 | - | |
| 18 | - /// <summary> | |
| 19 | - /// 停用 | |
| 20 | - /// </summary> | |
| 21 | - [Description("停用")] | |
| 22 | - DISABLE = 1, | |
| 23 | - | |
| 24 | - /// <summary> | |
| 25 | - /// 删除 | |
| 26 | - /// </summary> | |
| 27 | - [Description("删除")] | |
| 28 | - DELETED = 2 | |
| 29 | - } | |
| 30 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqInventory | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 库存创建输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqInventoryCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 产品名称 | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "产品名称不能为空")] | |
| 15 | + [StringLength(100, ErrorMessage = "产品名称长度不能超过100个字符")] | |
| 16 | + [Display(Name = "产品名称")] | |
| 17 | + public string ProductName { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 价格 | |
| 21 | + /// </summary> | |
| 22 | + [Required(ErrorMessage = "价格不能为空")] | |
| 23 | + [Range(0, double.MaxValue, ErrorMessage = "价格不能小于0")] | |
| 24 | + [Display(Name = "价格")] | |
| 25 | + public decimal Price { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 数量 | |
| 29 | + /// </summary> | |
| 30 | + [Range(0, int.MaxValue, ErrorMessage = "数量不能小于0")] | |
| 31 | + [Display(Name = "数量")] | |
| 32 | + public int Quantity { get; set; } = 0; | |
| 33 | + | |
| 34 | + /// <summary> | |
| 35 | + /// 产品类别 | |
| 36 | + /// </summary> | |
| 37 | + [Required(ErrorMessage = "产品类别不能为空")] | |
| 38 | + [StringLength(50, ErrorMessage = "产品类别长度不能超过50个字符")] | |
| 39 | + [Display(Name = "产品类别")] | |
| 40 | + public string ProductCategory { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 归属部门ID | |
| 44 | + /// </summary> | |
| 45 | + [Required(ErrorMessage = "归属部门ID不能为空")] | |
| 46 | + [StringLength(50, ErrorMessage = "归属部门ID长度不能超过50个字符")] | |
| 47 | + [Display(Name = "归属部门ID")] | |
| 48 | + public string DepartmentId { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 标准单位 | |
| 52 | + /// </summary> | |
| 53 | + [Required(ErrorMessage = "标准单位不能为空")] | |
| 54 | + [StringLength(20, ErrorMessage = "标准单位长度不能超过20个字符")] | |
| 55 | + [Display(Name = "标准单位")] | |
| 56 | + public string StandardUnit { get; set; } | |
| 57 | + } | |
| 58 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqInventory | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 库存详情输出 | |
| 8 | + /// </summary> | |
| 9 | + public class LqInventoryInfoOutput : LqInventoryListOutput | |
| 10 | + { | |
| 11 | + // 继承自LqInventoryListOutput,包含所有列表输出字段 | |
| 12 | + // 可以根据需要添加额外的详情字段 | |
| 13 | + } | |
| 14 | +} | |
| 0 | 15 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryListOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqInventory | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 库存列表输出 | |
| 8 | + /// </summary> | |
| 9 | + public class LqInventoryListOutput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 库存ID | |
| 13 | + /// </summary> | |
| 14 | + [Display(Name = "库存ID")] | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 产品名称 | |
| 19 | + /// </summary> | |
| 20 | + [Display(Name = "产品名称")] | |
| 21 | + public string productName { get; set; } | |
| 22 | + | |
| 23 | + /// <summary> | |
| 24 | + /// 价格 | |
| 25 | + /// </summary> | |
| 26 | + [Display(Name = "价格")] | |
| 27 | + public decimal price { get; set; } | |
| 28 | + | |
| 29 | + /// <summary> | |
| 30 | + /// 数量 | |
| 31 | + /// </summary> | |
| 32 | + [Display(Name = "数量")] | |
| 33 | + public int quantity { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 产品类别 | |
| 37 | + /// </summary> | |
| 38 | + [Display(Name = "产品类别")] | |
| 39 | + public string productCategory { get; set; } | |
| 40 | + | |
| 41 | + /// <summary> | |
| 42 | + /// 归属部门ID | |
| 43 | + /// </summary> | |
| 44 | + [Display(Name = "归属部门ID")] | |
| 45 | + public string departmentId { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 部门名称 | |
| 49 | + /// </summary> | |
| 50 | + [Display(Name = "部门名称")] | |
| 51 | + public string departmentName { get; set; } | |
| 52 | + | |
| 53 | + /// <summary> | |
| 54 | + /// 标准单位 | |
| 55 | + /// </summary> | |
| 56 | + [Display(Name = "标准单位")] | |
| 57 | + public string standardUnit { get; set; } | |
| 58 | + | |
| 59 | + /// <summary> | |
| 60 | + /// 总价值 | |
| 61 | + /// </summary> | |
| 62 | + [Display(Name = "总价值")] | |
| 63 | + public decimal totalValue { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 创建人ID | |
| 67 | + /// </summary> | |
| 68 | + [Display(Name = "创建人ID")] | |
| 69 | + public string createUser { get; set; } | |
| 70 | + | |
| 71 | + /// <summary> | |
| 72 | + /// 创建人姓名 | |
| 73 | + /// </summary> | |
| 74 | + [Display(Name = "创建人姓名")] | |
| 75 | + public string createUserName { get; set; } | |
| 76 | + | |
| 77 | + /// <summary> | |
| 78 | + /// 创建时间 | |
| 79 | + /// </summary> | |
| 80 | + [Display(Name = "创建时间")] | |
| 81 | + public DateTime createTime { get; set; } | |
| 82 | + | |
| 83 | + /// <summary> | |
| 84 | + /// 更新人ID | |
| 85 | + /// </summary> | |
| 86 | + [Display(Name = "更新人ID")] | |
| 87 | + public string updateUser { get; set; } | |
| 88 | + | |
| 89 | + /// <summary> | |
| 90 | + /// 更新人姓名 | |
| 91 | + /// </summary> | |
| 92 | + [Display(Name = "更新人姓名")] | |
| 93 | + public string updateUserName { get; set; } | |
| 94 | + | |
| 95 | + /// <summary> | |
| 96 | + /// 更新时间 | |
| 97 | + /// </summary> | |
| 98 | + [Display(Name = "更新时间")] | |
| 99 | + public DateTime? updateTime { get; set; } | |
| 100 | + | |
| 101 | + /// <summary> | |
| 102 | + /// 是否有效 | |
| 103 | + /// </summary> | |
| 104 | + [Display(Name = "是否有效")] | |
| 105 | + public int isEffective { get; set; } | |
| 106 | + } | |
| 107 | +} | |
| 0 | 108 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System; | |
| 3 | +using System.ComponentModel.DataAnnotations; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.Dto.LqInventory | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 库存列表查询输入 | |
| 9 | + /// </summary> | |
| 10 | + public class LqInventoryListQueryInput : PageInputBase | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 产品名称 | |
| 14 | + /// </summary> | |
| 15 | + [Display(Name = "产品名称", Description = "根据产品名称筛选")] | |
| 16 | + public string ProductName { get; set; } | |
| 17 | + | |
| 18 | + /// <summary> | |
| 19 | + /// 产品类别 | |
| 20 | + /// </summary> | |
| 21 | + [Display(Name = "产品类别", Description = "根据产品类别筛选")] | |
| 22 | + public string ProductCategory { get; set; } | |
| 23 | + | |
| 24 | + /// <summary> | |
| 25 | + /// 归属部门ID | |
| 26 | + /// </summary> | |
| 27 | + [Display(Name = "归属部门ID", Description = "根据归属部门ID筛选")] | |
| 28 | + public string DepartmentId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 价格最小值 | |
| 32 | + /// </summary> | |
| 33 | + [Display(Name = "价格最小值", Description = "价格范围的最小值")] | |
| 34 | + public decimal? PriceMin { get; set; } | |
| 35 | + | |
| 36 | + /// <summary> | |
| 37 | + /// 价格最大值 | |
| 38 | + /// </summary> | |
| 39 | + [Display(Name = "价格最大值", Description = "价格范围的最大值")] | |
| 40 | + public decimal? PriceMax { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 数量最小值 | |
| 44 | + /// </summary> | |
| 45 | + [Display(Name = "数量最小值", Description = "数量范围的最小值")] | |
| 46 | + public int? QuantityMin { get; set; } | |
| 47 | + | |
| 48 | + /// <summary> | |
| 49 | + /// 数量最大值 | |
| 50 | + /// </summary> | |
| 51 | + [Display(Name = "数量最大值", Description = "数量范围的最大值")] | |
| 52 | + public int? QuantityMax { get; set; } | |
| 53 | + | |
| 54 | + /// <summary> | |
| 55 | + /// 是否有效 | |
| 56 | + /// </summary> | |
| 57 | + [Display(Name = "是否有效", Description = "根据是否有效筛选")] | |
| 58 | + public int? IsEffective { get; set; } | |
| 59 | + } | |
| 60 | +} | |
| 0 | 61 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventory/LqInventoryUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqInventory | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 库存更新输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqInventoryUpInput : LqInventoryCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 库存ID | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "库存ID不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "库存ID长度不能超过50个字符")] | |
| 16 | + [Display(Name = "库存ID")] | |
| 17 | + public string Id { get; set; } | |
| 18 | + } | |
| 19 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqInventoryUsage | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 库存使用记录创建输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqInventoryUsageCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 产品ID | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "产品ID不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "产品ID长度不能超过50个字符")] | |
| 16 | + [Display(Name = "产品ID")] | |
| 17 | + public string ProductId { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 门店ID | |
| 21 | + /// </summary> | |
| 22 | + [Required(ErrorMessage = "门店ID不能为空")] | |
| 23 | + [StringLength(50, ErrorMessage = "门店ID长度不能超过50个字符")] | |
| 24 | + [Display(Name = "门店ID")] | |
| 25 | + public string StoreId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 使用时间 | |
| 29 | + /// </summary> | |
| 30 | + [Required(ErrorMessage = "使用时间不能为空")] | |
| 31 | + [Display(Name = "使用时间")] | |
| 32 | + public DateTime UsageTime { get; set; } | |
| 33 | + | |
| 34 | + /// <summary> | |
| 35 | + /// 使用数量 | |
| 36 | + /// </summary> | |
| 37 | + [Required(ErrorMessage = "使用数量不能为空")] | |
| 38 | + [Range(1, int.MaxValue, ErrorMessage = "使用数量必须大于0")] | |
| 39 | + [Display(Name = "使用数量")] | |
| 40 | + public int UsageQuantity { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 关联消耗ID | |
| 44 | + /// </summary> | |
| 45 | + [StringLength(50, ErrorMessage = "关联消耗ID长度不能超过50个字符")] | |
| 46 | + [Display(Name = "关联消耗ID")] | |
| 47 | + public string RelatedConsumeId { get; set; } | |
| 48 | + } | |
| 49 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqInventoryUsage | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 库存使用记录详情输出 | |
| 7 | + /// </summary> | |
| 8 | + public class LqInventoryUsageInfoOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 使用记录ID | |
| 12 | + /// </summary> | |
| 13 | + public string Id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 产品ID | |
| 17 | + /// </summary> | |
| 18 | + public string ProductId { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 产品名称 | |
| 22 | + /// </summary> | |
| 23 | + public string ProductName { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 产品类别 | |
| 27 | + /// </summary> | |
| 28 | + public string ProductCategory { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 产品价格 | |
| 32 | + /// </summary> | |
| 33 | + public decimal ProductPrice { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 产品标准单位 | |
| 37 | + /// </summary> | |
| 38 | + public string ProductStandardUnit { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 门店ID | |
| 42 | + /// </summary> | |
| 43 | + public string StoreId { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 门店名称 | |
| 47 | + /// </summary> | |
| 48 | + public string StoreName { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 使用时间 | |
| 52 | + /// </summary> | |
| 53 | + public DateTime UsageTime { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 使用数量 | |
| 57 | + /// </summary> | |
| 58 | + public int UsageQuantity { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 关联消耗ID | |
| 62 | + /// </summary> | |
| 63 | + public string RelatedConsumeId { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 创建人ID | |
| 67 | + /// </summary> | |
| 68 | + public string CreateUser { get; set; } | |
| 69 | + | |
| 70 | + /// <summary> | |
| 71 | + /// 创建人姓名 | |
| 72 | + /// </summary> | |
| 73 | + public string CreateUserName { get; set; } | |
| 74 | + | |
| 75 | + /// <summary> | |
| 76 | + /// 创建时间 | |
| 77 | + /// </summary> | |
| 78 | + public DateTime CreateTime { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 更新人ID | |
| 82 | + /// </summary> | |
| 83 | + public string UpdateUser { get; set; } | |
| 84 | + | |
| 85 | + /// <summary> | |
| 86 | + /// 更新人姓名 | |
| 87 | + /// </summary> | |
| 88 | + public string UpdateUserName { get; set; } | |
| 89 | + | |
| 90 | + /// <summary> | |
| 91 | + /// 更新时间 | |
| 92 | + /// </summary> | |
| 93 | + public DateTime? UpdateTime { get; set; } | |
| 94 | + | |
| 95 | + /// <summary> | |
| 96 | + /// 是否有效(1:有效 0:无效) | |
| 97 | + /// </summary> | |
| 98 | + public int IsEffective { get; set; } | |
| 99 | + | |
| 100 | + /// <summary> | |
| 101 | + /// 使用总价值 | |
| 102 | + /// </summary> | |
| 103 | + public decimal UsageTotalValue { get; set; } | |
| 104 | + } | |
| 105 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageListOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqInventoryUsage | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 库存使用记录列表输出 | |
| 7 | + /// </summary> | |
| 8 | + public class LqInventoryUsageListOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 使用记录ID | |
| 12 | + /// </summary> | |
| 13 | + public string Id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 产品ID | |
| 17 | + /// </summary> | |
| 18 | + public string ProductId { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 产品名称 | |
| 22 | + /// </summary> | |
| 23 | + public string ProductName { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 产品类别 | |
| 27 | + /// </summary> | |
| 28 | + public string ProductCategory { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 产品价格 | |
| 32 | + /// </summary> | |
| 33 | + public decimal ProductPrice { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 门店ID | |
| 37 | + /// </summary> | |
| 38 | + public string StoreId { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 门店名称 | |
| 42 | + /// </summary> | |
| 43 | + public string StoreName { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 使用时间 | |
| 47 | + /// </summary> | |
| 48 | + public DateTime UsageTime { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 使用数量 | |
| 52 | + /// </summary> | |
| 53 | + public int UsageQuantity { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 关联消耗ID | |
| 57 | + /// </summary> | |
| 58 | + public string RelatedConsumeId { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 创建人ID | |
| 62 | + /// </summary> | |
| 63 | + public string CreateUser { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 创建人姓名 | |
| 67 | + /// </summary> | |
| 68 | + public string CreateUserName { get; set; } | |
| 69 | + | |
| 70 | + /// <summary> | |
| 71 | + /// 创建时间 | |
| 72 | + /// </summary> | |
| 73 | + public DateTime CreateTime { get; set; } | |
| 74 | + | |
| 75 | + /// <summary> | |
| 76 | + /// 更新人ID | |
| 77 | + /// </summary> | |
| 78 | + public string UpdateUser { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 更新人姓名 | |
| 82 | + /// </summary> | |
| 83 | + public string UpdateUserName { get; set; } | |
| 84 | + | |
| 85 | + /// <summary> | |
| 86 | + /// 更新时间 | |
| 87 | + /// </summary> | |
| 88 | + public DateTime? UpdateTime { get; set; } | |
| 89 | + | |
| 90 | + /// <summary> | |
| 91 | + /// 是否有效(1:有效 0:无效) | |
| 92 | + /// </summary> | |
| 93 | + public int IsEffective { get; set; } | |
| 94 | + | |
| 95 | + /// <summary> | |
| 96 | + /// 使用总价值 | |
| 97 | + /// </summary> | |
| 98 | + public decimal UsageTotalValue { get; set; } | |
| 99 | + } | |
| 100 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqInventoryUsage | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 库存使用记录列表查询输入 | |
| 7 | + /// </summary> | |
| 8 | + public class LqInventoryUsageListQueryInput : PageInputBase | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 产品ID | |
| 12 | + /// </summary> | |
| 13 | + public string ProductId { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 产品名称 | |
| 17 | + /// </summary> | |
| 18 | + public string ProductName { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 产品类别 | |
| 22 | + /// </summary> | |
| 23 | + public string ProductCategory { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 门店ID | |
| 27 | + /// </summary> | |
| 28 | + public string StoreId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 门店名称 | |
| 32 | + /// </summary> | |
| 33 | + public string StoreName { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 使用开始时间 | |
| 37 | + /// </summary> | |
| 38 | + public System.DateTime? UsageStartTime { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 使用结束时间 | |
| 42 | + /// </summary> | |
| 43 | + public System.DateTime? UsageEndTime { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 关联消耗ID | |
| 47 | + /// </summary> | |
| 48 | + public string RelatedConsumeId { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 是否有效 | |
| 52 | + /// </summary> | |
| 53 | + public int? IsEffective { get; set; } | |
| 54 | + } | |
| 55 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageStatisticsInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqInventoryUsage | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 库存使用记录统计查询输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqInventoryUsageStatisticsInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 开始时间 | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "开始时间不能为空")] | |
| 15 | + [Display(Name = "开始时间")] | |
| 16 | + public DateTime StartTime { get; set; } | |
| 17 | + | |
| 18 | + /// <summary> | |
| 19 | + /// 结束时间 | |
| 20 | + /// </summary> | |
| 21 | + [Required(ErrorMessage = "结束时间不能为空")] | |
| 22 | + [Display(Name = "结束时间")] | |
| 23 | + public DateTime EndTime { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 产品ID(可选,用于筛选特定产品) | |
| 27 | + /// </summary> | |
| 28 | + [StringLength(50, ErrorMessage = "产品ID长度不能超过50个字符")] | |
| 29 | + [Display(Name = "产品ID")] | |
| 30 | + public string ProductId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 门店ID(可选,用于筛选特定门店) | |
| 34 | + /// </summary> | |
| 35 | + [StringLength(50, ErrorMessage = "门店ID长度不能超过50个字符")] | |
| 36 | + [Display(Name = "门店ID")] | |
| 37 | + public string StoreId { get; set; } | |
| 38 | + | |
| 39 | + /// <summary> | |
| 40 | + /// 产品类别(可选,用于筛选特定类别) | |
| 41 | + /// </summary> | |
| 42 | + [StringLength(50, ErrorMessage = "产品类别长度不能超过50个字符")] | |
| 43 | + [Display(Name = "产品类别")] | |
| 44 | + public string ProductCategory { get; set; } | |
| 45 | + | |
| 46 | + /// <summary> | |
| 47 | + /// 统计类型(日/周/月) | |
| 48 | + /// </summary> | |
| 49 | + [StringLength(10, ErrorMessage = "统计类型长度不能超过10个字符")] | |
| 50 | + [Display(Name = "统计类型")] | |
| 51 | + public string StatisticsType { get; set; } = "日"; | |
| 52 | + | |
| 53 | + /// <summary> | |
| 54 | + /// 排行榜数量(默认10) | |
| 55 | + /// </summary> | |
| 56 | + [Range(1, 100, ErrorMessage = "排行榜数量必须在1-100之间")] | |
| 57 | + [Display(Name = "排行榜数量")] | |
| 58 | + public int RankingCount { get; set; } = 10; | |
| 59 | + } | |
| 60 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageStatisticsOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqInventoryUsage | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 产品使用统计输出 | |
| 7 | + /// </summary> | |
| 8 | + public class ProductUsageStatisticsOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 产品ID | |
| 12 | + /// </summary> | |
| 13 | + public string ProductId { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 产品名称 | |
| 17 | + /// </summary> | |
| 18 | + public string ProductName { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 产品类别 | |
| 22 | + /// </summary> | |
| 23 | + public string ProductCategory { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 产品价格 | |
| 27 | + /// </summary> | |
| 28 | + public decimal ProductPrice { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 使用总数量 | |
| 32 | + /// </summary> | |
| 33 | + public int TotalUsageQuantity { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 使用总金额 | |
| 37 | + /// </summary> | |
| 38 | + public decimal TotalUsageAmount { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 使用次数 | |
| 42 | + /// </summary> | |
| 43 | + public int UsageCount { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 平均每次使用数量 | |
| 47 | + /// </summary> | |
| 48 | + public decimal AverageUsageQuantity { get; set; } | |
| 49 | + } | |
| 50 | + | |
| 51 | + /// <summary> | |
| 52 | + /// 门店使用统计输出 | |
| 53 | + /// </summary> | |
| 54 | + public class StoreUsageStatisticsOutput | |
| 55 | + { | |
| 56 | + /// <summary> | |
| 57 | + /// 门店ID | |
| 58 | + /// </summary> | |
| 59 | + public string StoreId { get; set; } | |
| 60 | + | |
| 61 | + /// <summary> | |
| 62 | + /// 门店名称 | |
| 63 | + /// </summary> | |
| 64 | + public string StoreName { get; set; } | |
| 65 | + | |
| 66 | + /// <summary> | |
| 67 | + /// 使用总数量 | |
| 68 | + /// </summary> | |
| 69 | + public int TotalUsageQuantity { get; set; } | |
| 70 | + | |
| 71 | + /// <summary> | |
| 72 | + /// 使用总金额 | |
| 73 | + /// </summary> | |
| 74 | + public decimal TotalUsageAmount { get; set; } | |
| 75 | + | |
| 76 | + /// <summary> | |
| 77 | + /// 使用次数 | |
| 78 | + /// </summary> | |
| 79 | + public int UsageCount { get; set; } | |
| 80 | + | |
| 81 | + /// <summary> | |
| 82 | + /// 使用产品种类数 | |
| 83 | + /// </summary> | |
| 84 | + public int ProductVarietyCount { get; set; } | |
| 85 | + } | |
| 86 | + | |
| 87 | + /// <summary> | |
| 88 | + /// 使用趋势统计输出 | |
| 89 | + /// </summary> | |
| 90 | + public class UsageTrendStatisticsOutput | |
| 91 | + { | |
| 92 | + /// <summary> | |
| 93 | + /// 统计日期 | |
| 94 | + /// </summary> | |
| 95 | + public DateTime StatisticsDate { get; set; } | |
| 96 | + | |
| 97 | + /// <summary> | |
| 98 | + /// 使用总数量 | |
| 99 | + /// </summary> | |
| 100 | + public int TotalUsageQuantity { get; set; } | |
| 101 | + | |
| 102 | + /// <summary> | |
| 103 | + /// 使用总金额 | |
| 104 | + /// </summary> | |
| 105 | + public decimal TotalUsageAmount { get; set; } | |
| 106 | + | |
| 107 | + /// <summary> | |
| 108 | + /// 使用次数 | |
| 109 | + /// </summary> | |
| 110 | + public int UsageCount { get; set; } | |
| 111 | + | |
| 112 | + /// <summary> | |
| 113 | + /// 使用产品种类数 | |
| 114 | + /// </summary> | |
| 115 | + public int ProductVarietyCount { get; set; } | |
| 116 | + } | |
| 117 | + | |
| 118 | + /// <summary> | |
| 119 | + /// 产品使用排行榜输出 | |
| 120 | + /// </summary> | |
| 121 | + public class ProductUsageRankingOutput | |
| 122 | + { | |
| 123 | + /// <summary> | |
| 124 | + /// 排名 | |
| 125 | + /// </summary> | |
| 126 | + public int Ranking { get; set; } | |
| 127 | + | |
| 128 | + /// <summary> | |
| 129 | + /// 产品ID | |
| 130 | + /// </summary> | |
| 131 | + public string ProductId { get; set; } | |
| 132 | + | |
| 133 | + /// <summary> | |
| 134 | + /// 产品名称 | |
| 135 | + /// </summary> | |
| 136 | + public string ProductName { get; set; } | |
| 137 | + | |
| 138 | + /// <summary> | |
| 139 | + /// 产品类别 | |
| 140 | + /// </summary> | |
| 141 | + public string ProductCategory { get; set; } | |
| 142 | + | |
| 143 | + /// <summary> | |
| 144 | + /// 使用总数量 | |
| 145 | + /// </summary> | |
| 146 | + public int TotalUsageQuantity { get; set; } | |
| 147 | + | |
| 148 | + /// <summary> | |
| 149 | + /// 使用总金额 | |
| 150 | + /// </summary> | |
| 151 | + public decimal TotalUsageAmount { get; set; } | |
| 152 | + | |
| 153 | + /// <summary> | |
| 154 | + /// 使用次数 | |
| 155 | + /// </summary> | |
| 156 | + public int UsageCount { get; set; } | |
| 157 | + | |
| 158 | + /// <summary> | |
| 159 | + /// 使用门店数 | |
| 160 | + /// </summary> | |
| 161 | + public int StoreCount { get; set; } | |
| 162 | + } | |
| 163 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqInventoryUsage/LqInventoryUsageUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqInventoryUsage | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 库存使用记录更新输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqInventoryUsageUpInput : LqInventoryUsageCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 使用记录ID | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "使用记录ID不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "使用记录ID长度不能超过50个字符")] | |
| 16 | + [Display(Name = "使用记录ID")] | |
| 17 | + public string Id { get; set; } | |
| 18 | + } | |
| 19 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/TransferCardInput.cs
0 → 100644
| 1 | +using System.Collections.Generic; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqKdKdjlb | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 转卡输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TransferCardInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 转出会员ID | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "转出会员ID不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "转出会员ID长度不能超过50个字符")] | |
| 16 | + [Display(Name = "转出会员ID")] | |
| 17 | + public string FromMemberId { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 转入会员ID | |
| 21 | + /// </summary> | |
| 22 | + [Required(ErrorMessage = "转入会员ID不能为空")] | |
| 23 | + [StringLength(50, ErrorMessage = "转入会员ID长度不能超过50个字符")] | |
| 24 | + [Display(Name = "转入会员ID")] | |
| 25 | + public string ToMemberId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 转出会员签名 | |
| 29 | + /// </summary> | |
| 30 | + [Required(ErrorMessage = "传出会员签名不能为空")] | |
| 31 | + [StringLength(50, ErrorMessage = "传出会员签名长度不能超过50个字符")] | |
| 32 | + [Display(Name = "传出会员签名")] | |
| 33 | + public string SignatureFile { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 转出品项列表 | |
| 37 | + /// </summary> | |
| 38 | + [Required(ErrorMessage = "转出品项列表不能为空")] | |
| 39 | + [Display(Name = "转出品项列表")] | |
| 40 | + public List<TransferItemInput> TransferItems { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 转卡备注 | |
| 44 | + /// </summary> | |
| 45 | + [StringLength(500, ErrorMessage = "转卡备注长度不能超过500个字符")] | |
| 46 | + [Display(Name = "转卡备注")] | |
| 47 | + public string Remarks { get; set; } | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + /// <summary> | |
| 52 | + /// 门店ID | |
| 53 | + /// </summary> | |
| 54 | + [Required(ErrorMessage = "门店ID不能为空")] | |
| 55 | + [StringLength(50, ErrorMessage = "门店ID长度不能超过50个字符")] | |
| 56 | + [Display(Name = "门店ID")] | |
| 57 | + public string StoreId { get; set; } | |
| 58 | + } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 转卡品项输入参数 | |
| 62 | + /// </summary> | |
| 63 | + public class TransferItemInput | |
| 64 | + { | |
| 65 | + /// <summary> | |
| 66 | + /// 开单品项明细ID | |
| 67 | + /// </summary> | |
| 68 | + [Required(ErrorMessage = "开单品项明细ID不能为空")] | |
| 69 | + [StringLength(50, ErrorMessage = "开单品项明细ID长度不能超过50个字符")] | |
| 70 | + [Display(Name = "开单品项明细ID")] | |
| 71 | + public string BillingItemId { get; set; } | |
| 72 | + | |
| 73 | + /// <summary> | |
| 74 | + /// 转出数量 | |
| 75 | + /// </summary> | |
| 76 | + [Required(ErrorMessage = "转出数量不能为空")] | |
| 77 | + [Range(1, int.MaxValue, ErrorMessage = "转出数量必须大于0")] | |
| 78 | + [Display(Name = "转出数量")] | |
| 79 | + public int TransferQuantity { get; set; } | |
| 80 | + | |
| 81 | + /// <summary> | |
| 82 | + /// 品项ID | |
| 83 | + /// </summary> | |
| 84 | + [Required(ErrorMessage = "品项ID不能为空")] | |
| 85 | + [StringLength(50, ErrorMessage = "品项ID长度不能超过50个字符")] | |
| 86 | + [Display(Name = "品项ID")] | |
| 87 | + public string ItemId { get; set; } | |
| 88 | + | |
| 89 | + /// <summary> | |
| 90 | + /// 品项名称 | |
| 91 | + /// </summary> | |
| 92 | + [Required(ErrorMessage = "品项名称不能为空")] | |
| 93 | + [StringLength(100, ErrorMessage = "品项名称长度不能超过100个字符")] | |
| 94 | + [Display(Name = "品项名称")] | |
| 95 | + public string ItemName { get; set; } | |
| 96 | + | |
| 97 | + /// <summary> | |
| 98 | + /// 品项价格 | |
| 99 | + /// </summary> | |
| 100 | + [Required(ErrorMessage = "品项价格不能为空")] | |
| 101 | + [Range(0, double.MaxValue, ErrorMessage = "品项价格不能为负数")] | |
| 102 | + [Display(Name = "品项价格")] | |
| 103 | + public decimal ItemPrice { get; set; } | |
| 104 | + | |
| 105 | + /// <summary> | |
| 106 | + /// 来源类型 | |
| 107 | + /// </summary> | |
| 108 | + [StringLength(50, ErrorMessage = "来源类型长度不能超过50个字符")] | |
| 109 | + [Display(Name = "来源类型")] | |
| 110 | + public string SourceType { get; set; } = "转卡"; | |
| 111 | + | |
| 112 | + /// <summary> | |
| 113 | + /// 健康师业绩列表 | |
| 114 | + /// </summary> | |
| 115 | + [Display(Name = "健康师业绩列表")] | |
| 116 | + public List<TransferHealthTeacherPerformanceInput> HealthTeacherPerformances { get; set; } | |
| 117 | + | |
| 118 | + /// <summary> | |
| 119 | + /// 科技部老师业绩列表 | |
| 120 | + /// </summary> | |
| 121 | + [Display(Name = "科技部老师业绩列表")] | |
| 122 | + public List<TransferTechTeacherPerformanceInput> TechTeacherPerformances { get; set; } | |
| 123 | + } | |
| 124 | + | |
| 125 | + /// <summary> | |
| 126 | + /// 转卡健康师业绩输入参数 | |
| 127 | + /// </summary> | |
| 128 | + public class TransferHealthTeacherPerformanceInput | |
| 129 | + { | |
| 130 | + /// <summary> | |
| 131 | + /// 健康师ID | |
| 132 | + /// </summary> | |
| 133 | + [Required(ErrorMessage = "健康师ID不能为空")] | |
| 134 | + [StringLength(50, ErrorMessage = "健康师ID长度不能超过50个字符")] | |
| 135 | + [Display(Name = "健康师ID")] | |
| 136 | + public string HealthTeacherId { get; set; } | |
| 137 | + | |
| 138 | + /// <summary> | |
| 139 | + /// 健康师姓名 | |
| 140 | + /// </summary> | |
| 141 | + [Required(ErrorMessage = "健康师姓名不能为空")] | |
| 142 | + [StringLength(50, ErrorMessage = "健康师姓名长度不能超过50个字符")] | |
| 143 | + [Display(Name = "健康师姓名")] | |
| 144 | + public string HealthTeacherName { get; set; } | |
| 145 | + | |
| 146 | + /// <summary> | |
| 147 | + /// 健康师账号 | |
| 148 | + /// </summary> | |
| 149 | + [StringLength(50, ErrorMessage = "健康师账号长度不能超过50个字符")] | |
| 150 | + [Display(Name = "健康师账号")] | |
| 151 | + public string HealthTeacherAccount { get; set; } | |
| 152 | + | |
| 153 | + /// <summary> | |
| 154 | + /// 业绩金额 | |
| 155 | + /// </summary> | |
| 156 | + [Required(ErrorMessage = "业绩金额不能为空")] | |
| 157 | + [Range(0, double.MaxValue, ErrorMessage = "业绩金额不能为负数")] | |
| 158 | + [Display(Name = "业绩金额")] | |
| 159 | + public decimal PerformanceAmount { get; set; } | |
| 160 | + | |
| 161 | + /// <summary> | |
| 162 | + /// 人工成本 | |
| 163 | + /// </summary> | |
| 164 | + [Range(0, double.MaxValue, ErrorMessage = "人工成本不能为负数")] | |
| 165 | + [Display(Name = "人工成本")] | |
| 166 | + public decimal LaborCost { get; set; } | |
| 167 | + | |
| 168 | + /// <summary> | |
| 169 | + /// 品项数量 | |
| 170 | + /// </summary> | |
| 171 | + [Required(ErrorMessage = "品项数量不能为空")] | |
| 172 | + [Range(1, int.MaxValue, ErrorMessage = "品项数量必须大于0")] | |
| 173 | + [Display(Name = "品项数量")] | |
| 174 | + public int ItemQuantity { get; set; } | |
| 175 | + } | |
| 176 | + | |
| 177 | + /// <summary> | |
| 178 | + /// 转卡科技部老师业绩输入参数 | |
| 179 | + /// </summary> | |
| 180 | + public class TransferTechTeacherPerformanceInput | |
| 181 | + { | |
| 182 | + /// <summary> | |
| 183 | + /// 科技部老师ID | |
| 184 | + /// </summary> | |
| 185 | + [Required(ErrorMessage = "科技部老师ID不能为空")] | |
| 186 | + [StringLength(50, ErrorMessage = "科技部老师ID长度不能超过50个字符")] | |
| 187 | + [Display(Name = "科技部老师ID")] | |
| 188 | + public string TechTeacherId { get; set; } | |
| 189 | + | |
| 190 | + /// <summary> | |
| 191 | + /// 科技部老师姓名 | |
| 192 | + /// </summary> | |
| 193 | + [Required(ErrorMessage = "科技部老师姓名不能为空")] | |
| 194 | + [StringLength(50, ErrorMessage = "科技部老师姓名长度不能超过50个字符")] | |
| 195 | + [Display(Name = "科技部老师姓名")] | |
| 196 | + public string TechTeacherName { get; set; } | |
| 197 | + | |
| 198 | + /// <summary> | |
| 199 | + /// 科技部老师账号 | |
| 200 | + /// </summary> | |
| 201 | + [StringLength(50, ErrorMessage = "科技部老师账号长度不能超过50个字符")] | |
| 202 | + [Display(Name = "科技部老师账号")] | |
| 203 | + public string TechTeacherAccount { get; set; } | |
| 204 | + | |
| 205 | + /// <summary> | |
| 206 | + /// 业绩金额 | |
| 207 | + /// </summary> | |
| 208 | + [Required(ErrorMessage = "业绩金额不能为空")] | |
| 209 | + [Range(0, double.MaxValue, ErrorMessage = "业绩金额不能为负数")] | |
| 210 | + [Display(Name = "业绩金额")] | |
| 211 | + public decimal PerformanceAmount { get; set; } | |
| 212 | + | |
| 213 | + /// <summary> | |
| 214 | + /// 人工成本 | |
| 215 | + /// </summary> | |
| 216 | + [Range(0, double.MaxValue, ErrorMessage = "人工成本不能为负数")] | |
| 217 | + [Display(Name = "人工成本")] | |
| 218 | + public decimal LaborCost { get; set; } | |
| 219 | + | |
| 220 | + /// <summary> | |
| 221 | + /// 品项数量 | |
| 222 | + /// </summary> | |
| 223 | + [Required(ErrorMessage = "品项数量不能为空")] | |
| 224 | + [Range(1, int.MaxValue, ErrorMessage = "品项数量必须大于0")] | |
| 225 | + [Display(Name = "品项数量")] | |
| 226 | + public int ItemQuantity { get; set; } | |
| 227 | + } | |
| 228 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/TransferCardOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqKdKdjlb | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 转卡输出参数 | |
| 7 | + /// </summary> | |
| 8 | + public class TransferCardOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 转卡是否成功 | |
| 12 | + /// </summary> | |
| 13 | + public bool Success { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 转卡记录ID(退卡记录ID) | |
| 17 | + /// </summary> | |
| 18 | + public string TransferId { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 退卡记录ID | |
| 22 | + /// </summary> | |
| 23 | + public string RefundId { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 开卡记录ID | |
| 27 | + /// </summary> | |
| 28 | + public string BillingId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 转卡总金额 | |
| 32 | + /// </summary> | |
| 33 | + public decimal TotalAmount { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 转卡品项数量 | |
| 37 | + /// </summary> | |
| 38 | + public int TotalQuantity { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 转出会员姓名 | |
| 42 | + /// </summary> | |
| 43 | + public string FromMemberName { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 转入会员姓名 | |
| 47 | + /// </summary> | |
| 48 | + public string ToMemberName { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 转卡时间 | |
| 52 | + /// </summary> | |
| 53 | + public DateTime TransferTime { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 消息 | |
| 57 | + /// </summary> | |
| 58 | + public string Message { get; set; } | |
| 59 | + } | |
| 60 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassAddStudentsInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using System.ComponentModel.DataAnnotations; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 向学习班级添加学员输入 | |
| 9 | + /// </summary> | |
| 10 | + public class LqStudyClassAddStudentsInput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 班级ID | |
| 14 | + /// </summary> | |
| 15 | + [Required(ErrorMessage = "班级ID不能为空")] | |
| 16 | + [StringLength(50, ErrorMessage = "班级ID长度不能超过50个字符")] | |
| 17 | + [Display(Name = "班级ID")] | |
| 18 | + public string ClassId { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// </summary> | |
| 22 | + [Required(ErrorMessage = "学员列表不能为空")] | |
| 23 | + [Display(Name = "学员列表")] | |
| 24 | + public List<LqStudyStudentCreateInput> Students { get; set; } = new List<LqStudyStudentCreateInput>(); | |
| 25 | + } | |
| 26 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 学习班级创建输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyClassCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 班级名称 | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "班级名称不能为空")] | |
| 15 | + [StringLength(100, ErrorMessage = "班级名称长度不能超过100个字符")] | |
| 16 | + [Display(Name = "班级名称")] | |
| 17 | + public string ClassName { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 任教老师ID | |
| 21 | + /// </summary> | |
| 22 | + [Required(ErrorMessage = "任教老师ID不能为空")] | |
| 23 | + [StringLength(50, ErrorMessage = "任教老师ID长度不能超过50个字符")] | |
| 24 | + [Display(Name = "任教老师ID")] | |
| 25 | + public string TeacherId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 开始时间 | |
| 29 | + /// </summary> | |
| 30 | + [Required(ErrorMessage = "开始时间不能为空")] | |
| 31 | + [Display(Name = "开始时间")] | |
| 32 | + public DateTime StartTime { get; set; } | |
| 33 | + | |
| 34 | + /// <summary> | |
| 35 | + /// 结束时间 | |
| 36 | + /// </summary> | |
| 37 | + [Required(ErrorMessage = "结束时间不能为空")] | |
| 38 | + [Display(Name = "结束时间")] | |
| 39 | + public DateTime EndTime { get; set; } | |
| 40 | + | |
| 41 | + /// <summary> | |
| 42 | + /// 备注 | |
| 43 | + /// </summary> | |
| 44 | + [StringLength(500, ErrorMessage = "备注长度不能超过500个字符")] | |
| 45 | + [Display(Name = "备注")] | |
| 46 | + public string Remark { get; set; } | |
| 47 | + } | |
| 48 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassCreateWithStudentsInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using System.ComponentModel.DataAnnotations; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 创建学习班级并添加学员输入 | |
| 9 | + /// </summary> | |
| 10 | + public class LqStudyClassCreateWithStudentsInput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 班级名称 | |
| 14 | + /// </summary> | |
| 15 | + [Required(ErrorMessage = "班级名称不能为空")] | |
| 16 | + [StringLength(100, ErrorMessage = "班级名称长度不能超过100个字符")] | |
| 17 | + [Display(Name = "班级名称")] | |
| 18 | + public string ClassName { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 任教老师ID | |
| 22 | + /// </summary> | |
| 23 | + [Required(ErrorMessage = "任教老师ID不能为空")] | |
| 24 | + [StringLength(50, ErrorMessage = "任教老师ID长度不能超过50个字符")] | |
| 25 | + [Display(Name = "任教老师ID")] | |
| 26 | + public string TeacherId { get; set; } | |
| 27 | + | |
| 28 | + /// <summary> | |
| 29 | + /// 开始时间 | |
| 30 | + /// </summary> | |
| 31 | + [Required(ErrorMessage = "开始时间不能为空")] | |
| 32 | + [Display(Name = "开始时间")] | |
| 33 | + public DateTime StartTime { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 结束时间 | |
| 37 | + /// </summary> | |
| 38 | + [Required(ErrorMessage = "结束时间不能为空")] | |
| 39 | + [Display(Name = "结束时间")] | |
| 40 | + public DateTime EndTime { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 备注 | |
| 44 | + /// </summary> | |
| 45 | + [StringLength(500, ErrorMessage = "备注长度不能超过500个字符")] | |
| 46 | + [Display(Name = "备注")] | |
| 47 | + public string Remark { get; set; } | |
| 48 | + | |
| 49 | + /// <summary> | |
| 50 | + /// 学员列表 | |
| 51 | + /// </summary> | |
| 52 | + [Display(Name = "学员列表")] | |
| 53 | + public List<LqStudyStudentCreateInput> Students { get; set; } = new List<LqStudyStudentCreateInput>(); | |
| 54 | + } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 学员创建输入 | |
| 58 | + /// </summary> | |
| 59 | + public class LqStudyStudentCreateInput | |
| 60 | + { | |
| 61 | + /// <summary> | |
| 62 | + /// 员工姓名 | |
| 63 | + /// </summary> | |
| 64 | + [Required(ErrorMessage = "员工姓名不能为空")] | |
| 65 | + [StringLength(50, ErrorMessage = "员工姓名长度不能超过50个字符")] | |
| 66 | + [Display(Name = "员工姓名")] | |
| 67 | + public string EmployeeName { get; set; } | |
| 68 | + | |
| 69 | + /// <summary> | |
| 70 | + /// 员工电话 | |
| 71 | + /// </summary> | |
| 72 | + [Required(ErrorMessage = "员工电话不能为空")] | |
| 73 | + [StringLength(20, ErrorMessage = "员工电话长度不能超过20个字符")] | |
| 74 | + [Display(Name = "员工电话")] | |
| 75 | + public string EmployeePhone { get; set; } | |
| 76 | + | |
| 77 | + /// <summary> | |
| 78 | + /// 员工ID | |
| 79 | + /// </summary> | |
| 80 | + [Required(ErrorMessage = "员工ID不能为空")] | |
| 81 | + [StringLength(50, ErrorMessage = "员工ID长度不能超过50个字符")] | |
| 82 | + [Display(Name = "员工ID")] | |
| 83 | + public string EmployeeId { get; set; } | |
| 84 | + | |
| 85 | + /// <summary> | |
| 86 | + /// 入院时间 | |
| 87 | + /// </summary> | |
| 88 | + [Required(ErrorMessage = "入院时间不能为空")] | |
| 89 | + [Display(Name = "入院时间")] | |
| 90 | + public DateTime AdmissionTime { get; set; } | |
| 91 | + | |
| 92 | + /// <summary> | |
| 93 | + /// HR归属 | |
| 94 | + /// </summary> | |
| 95 | + [StringLength(50, ErrorMessage = "HR归属长度不能超过50个字符")] | |
| 96 | + [Display(Name = "HR归属")] | |
| 97 | + public string HrBelong { get; set; } | |
| 98 | + } | |
| 99 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 学习班级详情输出 | |
| 7 | + /// </summary> | |
| 8 | + public class LqStudyClassInfoOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 班级ID | |
| 12 | + /// </summary> | |
| 13 | + public string Id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 班级名称 | |
| 17 | + /// </summary> | |
| 18 | + public string ClassName { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 任教老师ID | |
| 22 | + /// </summary> | |
| 23 | + public string TeacherId { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 任教老师姓名 | |
| 27 | + /// </summary> | |
| 28 | + public string TeacherName { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 任教老师电话 | |
| 32 | + /// </summary> | |
| 33 | + public string TeacherPhone { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 开始时间 | |
| 37 | + /// </summary> | |
| 38 | + public DateTime StartTime { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 结束时间 | |
| 42 | + /// </summary> | |
| 43 | + public DateTime EndTime { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 备注 | |
| 47 | + /// </summary> | |
| 48 | + public string Remark { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 创建人ID | |
| 52 | + /// </summary> | |
| 53 | + public string CreateUser { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 创建人姓名 | |
| 57 | + /// </summary> | |
| 58 | + public string CreateUserName { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 创建时间 | |
| 62 | + /// </summary> | |
| 63 | + public DateTime CreateTime { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 更新人ID | |
| 67 | + /// </summary> | |
| 68 | + public string UpdateUser { get; set; } | |
| 69 | + | |
| 70 | + /// <summary> | |
| 71 | + /// 更新人姓名 | |
| 72 | + /// </summary> | |
| 73 | + public string UpdateUserName { get; set; } | |
| 74 | + | |
| 75 | + /// <summary> | |
| 76 | + /// 更新时间 | |
| 77 | + /// </summary> | |
| 78 | + public DateTime? UpdateTime { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 是否有效(1:有效 0:无效) | |
| 82 | + /// </summary> | |
| 83 | + public int IsEffective { get; set; } | |
| 84 | + | |
| 85 | + /// <summary> | |
| 86 | + /// 学员数量 | |
| 87 | + /// </summary> | |
| 88 | + public int StudentCount { get; set; } | |
| 89 | + | |
| 90 | + /// <summary> | |
| 91 | + /// 学习记录数量 | |
| 92 | + /// </summary> | |
| 93 | + public int RecordCount { get; set; } | |
| 94 | + } | |
| 95 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassListOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 学习班级列表输出 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyClassListOutput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 班级ID | |
| 13 | + /// </summary> | |
| 14 | + [Display(Name = "班级ID")] | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 班级名称 | |
| 19 | + /// </summary> | |
| 20 | + [Display(Name = "班级名称")] | |
| 21 | + public string className { get; set; } | |
| 22 | + | |
| 23 | + /// <summary> | |
| 24 | + /// 任教老师ID | |
| 25 | + /// </summary> | |
| 26 | + [Display(Name = "任教老师ID")] | |
| 27 | + public string teacherId { get; set; } | |
| 28 | + | |
| 29 | + /// <summary> | |
| 30 | + /// 任教老师姓名 | |
| 31 | + /// </summary> | |
| 32 | + [Display(Name = "任教老师姓名")] | |
| 33 | + public string teacherName { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 开始时间 | |
| 37 | + /// </summary> | |
| 38 | + [Display(Name = "开始时间")] | |
| 39 | + public DateTime startTime { get; set; } | |
| 40 | + | |
| 41 | + /// <summary> | |
| 42 | + /// 结束时间 | |
| 43 | + /// </summary> | |
| 44 | + [Display(Name = "结束时间")] | |
| 45 | + public DateTime endTime { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 备注 | |
| 49 | + /// </summary> | |
| 50 | + [Display(Name = "备注")] | |
| 51 | + public string remark { get; set; } | |
| 52 | + | |
| 53 | + /// <summary> | |
| 54 | + /// 学员数量 | |
| 55 | + /// </summary> | |
| 56 | + [Display(Name = "学员数量")] | |
| 57 | + public int studentCount { get; set; } | |
| 58 | + | |
| 59 | + /// <summary> | |
| 60 | + /// 创建人ID | |
| 61 | + /// </summary> | |
| 62 | + [Display(Name = "创建人ID")] | |
| 63 | + public string createUser { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 创建人姓名 | |
| 67 | + /// </summary> | |
| 68 | + [Display(Name = "创建人姓名")] | |
| 69 | + public string createUserName { get; set; } | |
| 70 | + | |
| 71 | + /// <summary> | |
| 72 | + /// 创建时间 | |
| 73 | + /// </summary> | |
| 74 | + [Display(Name = "创建时间")] | |
| 75 | + public DateTime createTime { get; set; } | |
| 76 | + | |
| 77 | + /// <summary> | |
| 78 | + /// 更新人ID | |
| 79 | + /// </summary> | |
| 80 | + [Display(Name = "更新人ID")] | |
| 81 | + public string updateUser { get; set; } | |
| 82 | + | |
| 83 | + /// <summary> | |
| 84 | + /// 更新人姓名 | |
| 85 | + /// </summary> | |
| 86 | + [Display(Name = "更新人姓名")] | |
| 87 | + public string updateUserName { get; set; } | |
| 88 | + | |
| 89 | + /// <summary> | |
| 90 | + /// 更新时间 | |
| 91 | + /// </summary> | |
| 92 | + [Display(Name = "更新时间")] | |
| 93 | + public DateTime? updateTime { get; set; } | |
| 94 | + | |
| 95 | + /// <summary> | |
| 96 | + /// 是否有效 | |
| 97 | + /// </summary> | |
| 98 | + [Display(Name = "是否有效")] | |
| 99 | + public int isEffective { get; set; } | |
| 100 | + } | |
| 101 | +} | |
| 0 | 102 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System; | |
| 3 | +using System.ComponentModel.DataAnnotations; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 学习班级列表查询输入 | |
| 9 | + /// </summary> | |
| 10 | + public class LqStudyClassListQueryInput : PageInputBase | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 班级名称 | |
| 14 | + /// </summary> | |
| 15 | + [Display(Name = "班级名称", Description = "根据班级名称筛选")] | |
| 16 | + public string ClassName { get; set; } | |
| 17 | + | |
| 18 | + /// <summary> | |
| 19 | + /// 任教老师ID | |
| 20 | + /// </summary> | |
| 21 | + [Display(Name = "任教老师ID", Description = "根据任教老师ID筛选")] | |
| 22 | + public string TeacherId { get; set; } | |
| 23 | + | |
| 24 | + /// <summary> | |
| 25 | + /// 开始时间(班级开始时间范围) | |
| 26 | + /// </summary> | |
| 27 | + [Display(Name = "开始时间", Description = "班级开始时间的开始范围")] | |
| 28 | + public DateTime? StartTime { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 结束时间(班级开始时间范围) | |
| 32 | + /// </summary> | |
| 33 | + [Display(Name = "结束时间", Description = "班级开始时间的结束范围")] | |
| 34 | + public DateTime? EndTime { get; set; } | |
| 35 | + | |
| 36 | + /// <summary> | |
| 37 | + /// 是否有效 | |
| 38 | + /// </summary> | |
| 39 | + [Display(Name = "是否有效", Description = "根据是否有效筛选")] | |
| 40 | + public int? IsEffective { get; set; } | |
| 41 | + } | |
| 42 | +} | |
| 0 | 43 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyClassUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 学习班级更新输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyClassUpInput : LqStudyClassCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 班级ID | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "班级ID不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "班级ID长度不能超过50个字符")] | |
| 16 | + [Display(Name = "班级ID")] | |
| 17 | + public string Id { get; set; } | |
| 18 | + } | |
| 19 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordCreateInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 添加学习记录输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyRecordCreateInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 员工姓名 | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "员工姓名不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "员工姓名长度不能超过50个字符")] | |
| 16 | + [Display(Name = "员工姓名")] | |
| 17 | + public string EmployeeName { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 员工ID | |
| 21 | + /// </summary> | |
| 22 | + [Required(ErrorMessage = "员工ID不能为空")] | |
| 23 | + [StringLength(50, ErrorMessage = "员工ID长度不能超过50个字符")] | |
| 24 | + [Display(Name = "员工ID")] | |
| 25 | + public string EmployeeId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 学习类型 | |
| 29 | + /// </summary> | |
| 30 | + [Required(ErrorMessage = "学习类型不能为空")] | |
| 31 | + [StringLength(50, ErrorMessage = "学习类型长度不能超过50个字符")] | |
| 32 | + [Display(Name = "学习类型")] | |
| 33 | + public string StudyType { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 交通费 | |
| 37 | + /// </summary> | |
| 38 | + [Range(0, double.MaxValue, ErrorMessage = "交通费不能为负数")] | |
| 39 | + [Display(Name = "交通费")] | |
| 40 | + public decimal? TransportFee { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 学习日期 | |
| 44 | + /// </summary> | |
| 45 | + [Required(ErrorMessage = "学习日期不能为空")] | |
| 46 | + [Display(Name = "学习日期")] | |
| 47 | + public DateTime StudyDate { get; set; } | |
| 48 | + | |
| 49 | + /// <summary> | |
| 50 | + /// 当日状态 | |
| 51 | + /// </summary> | |
| 52 | + [StringLength(50, ErrorMessage = "当日状态长度不能超过50个字符")] | |
| 53 | + [Display(Name = "当日状态")] | |
| 54 | + public string DailyStatus { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 备注 | |
| 58 | + /// </summary> | |
| 59 | + [StringLength(500, ErrorMessage = "备注长度不能超过500个字符")] | |
| 60 | + [Display(Name = "备注")] | |
| 61 | + public string Remark { get; set; } | |
| 62 | + | |
| 63 | + /// <summary> | |
| 64 | + /// 是否下店协助(1:是 0:否) | |
| 65 | + /// </summary> | |
| 66 | + [Display(Name = "是否下店协助")] | |
| 67 | + public int IsStoreAssist { get; set; } = 0; | |
| 68 | + | |
| 69 | + /// <summary> | |
| 70 | + /// 下店门店ID | |
| 71 | + /// </summary> | |
| 72 | + [StringLength(50, ErrorMessage = "下店门店ID长度不能超过50个字符")] | |
| 73 | + [Display(Name = "下店门店ID")] | |
| 74 | + public string StoreId { get; set; } | |
| 75 | + | |
| 76 | + /// <summary> | |
| 77 | + /// 下店门店名称 | |
| 78 | + /// </summary> | |
| 79 | + [StringLength(100, ErrorMessage = "下店门店名称长度不能超过100个字符")] | |
| 80 | + [Display(Name = "下店门店名称")] | |
| 81 | + public string StoreName { get; set; } | |
| 82 | + } | |
| 83 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordListOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 学习记录列表输出 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyRecordListOutput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 学习记录ID | |
| 13 | + /// </summary> | |
| 14 | + [Display(Name = "学习记录ID")] | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 员工姓名 | |
| 19 | + /// </summary> | |
| 20 | + [Display(Name = "员工姓名")] | |
| 21 | + public string employeeName { get; set; } | |
| 22 | + | |
| 23 | + /// <summary> | |
| 24 | + /// 员工ID | |
| 25 | + /// </summary> | |
| 26 | + [Display(Name = "员工ID")] | |
| 27 | + public string employeeId { get; set; } | |
| 28 | + | |
| 29 | + /// <summary> | |
| 30 | + /// 学习类型 | |
| 31 | + /// </summary> | |
| 32 | + [Display(Name = "学习类型")] | |
| 33 | + public string studyType { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 交通费 | |
| 37 | + /// </summary> | |
| 38 | + [Display(Name = "交通费")] | |
| 39 | + public decimal? transportFee { get; set; } | |
| 40 | + | |
| 41 | + /// <summary> | |
| 42 | + /// 学习日期 | |
| 43 | + /// </summary> | |
| 44 | + [Display(Name = "学习日期")] | |
| 45 | + public DateTime studyDate { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 当日状态 | |
| 49 | + /// </summary> | |
| 50 | + [Display(Name = "当日状态")] | |
| 51 | + public string dailyStatus { get; set; } | |
| 52 | + | |
| 53 | + /// <summary> | |
| 54 | + /// 备注 | |
| 55 | + /// </summary> | |
| 56 | + [Display(Name = "备注")] | |
| 57 | + public string remark { get; set; } | |
| 58 | + | |
| 59 | + /// <summary> | |
| 60 | + /// 是否下店协助 | |
| 61 | + /// </summary> | |
| 62 | + [Display(Name = "是否下店协助")] | |
| 63 | + public int isStoreAssist { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 下店门店ID | |
| 67 | + /// </summary> | |
| 68 | + [Display(Name = "下店门店ID")] | |
| 69 | + public string storeId { get; set; } | |
| 70 | + | |
| 71 | + /// <summary> | |
| 72 | + /// 下店门店名称 | |
| 73 | + /// </summary> | |
| 74 | + [Display(Name = "下店门店名称")] | |
| 75 | + public string storeName { get; set; } | |
| 76 | + | |
| 77 | + /// <summary> | |
| 78 | + /// 创建人ID | |
| 79 | + /// </summary> | |
| 80 | + [Display(Name = "创建人ID")] | |
| 81 | + public string createUser { get; set; } | |
| 82 | + | |
| 83 | + /// <summary> | |
| 84 | + /// 创建人姓名 | |
| 85 | + /// </summary> | |
| 86 | + [Display(Name = "创建人姓名")] | |
| 87 | + public string createUserName { get; set; } | |
| 88 | + | |
| 89 | + /// <summary> | |
| 90 | + /// 创建时间 | |
| 91 | + /// </summary> | |
| 92 | + [Display(Name = "创建时间")] | |
| 93 | + public DateTime createTime { get; set; } | |
| 94 | + | |
| 95 | + /// <summary> | |
| 96 | + /// 更新人ID | |
| 97 | + /// </summary> | |
| 98 | + [Display(Name = "更新人ID")] | |
| 99 | + public string updateUser { get; set; } | |
| 100 | + | |
| 101 | + /// <summary> | |
| 102 | + /// 更新人姓名 | |
| 103 | + /// </summary> | |
| 104 | + [Display(Name = "更新人姓名")] | |
| 105 | + public string updateUserName { get; set; } | |
| 106 | + | |
| 107 | + /// <summary> | |
| 108 | + /// 更新时间 | |
| 109 | + /// </summary> | |
| 110 | + [Display(Name = "更新时间")] | |
| 111 | + public DateTime? updateTime { get; set; } | |
| 112 | + | |
| 113 | + /// <summary> | |
| 114 | + /// 是否有效 | |
| 115 | + /// </summary> | |
| 116 | + [Display(Name = "是否有效")] | |
| 117 | + public int isEffective { get; set; } | |
| 118 | + } | |
| 119 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyRecordListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System; | |
| 3 | +using System.ComponentModel.DataAnnotations; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 学习记录列表查询输入 | |
| 9 | + /// </summary> | |
| 10 | + public class LqStudyRecordListQueryInput : PageInputBase | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 员工姓名 | |
| 14 | + /// </summary> | |
| 15 | + [Display(Name = "员工姓名", Description = "根据员工姓名筛选")] | |
| 16 | + public string EmployeeName { get; set; } | |
| 17 | + | |
| 18 | + /// <summary> | |
| 19 | + /// 员工ID | |
| 20 | + /// </summary> | |
| 21 | + [Display(Name = "员工ID", Description = "根据员工ID筛选")] | |
| 22 | + public string EmployeeId { get; set; } | |
| 23 | + | |
| 24 | + /// <summary> | |
| 25 | + /// 学习类型 | |
| 26 | + /// </summary> | |
| 27 | + [Display(Name = "学习类型", Description = "根据学习类型筛选")] | |
| 28 | + public string StudyType { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 学习日期开始 | |
| 32 | + /// </summary> | |
| 33 | + [Display(Name = "学习日期开始", Description = "学习日期的开始范围")] | |
| 34 | + public DateTime? StudyDateStart { get; set; } | |
| 35 | + | |
| 36 | + /// <summary> | |
| 37 | + /// 学习日期结束 | |
| 38 | + /// </summary> | |
| 39 | + [Display(Name = "学习日期结束", Description = "学习日期的结束范围")] | |
| 40 | + public DateTime? StudyDateEnd { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 当日状态 | |
| 44 | + /// </summary> | |
| 45 | + [Display(Name = "当日状态", Description = "根据当日状态筛选")] | |
| 46 | + public string DailyStatus { get; set; } | |
| 47 | + | |
| 48 | + /// <summary> | |
| 49 | + /// 是否下店协助 | |
| 50 | + /// </summary> | |
| 51 | + [Display(Name = "是否下店协助", Description = "根据是否下店协助筛选")] | |
| 52 | + public int? IsStoreAssist { get; set; } | |
| 53 | + | |
| 54 | + /// <summary> | |
| 55 | + /// 门店ID | |
| 56 | + /// </summary> | |
| 57 | + [Display(Name = "门店ID", Description = "根据门店ID筛选")] | |
| 58 | + public string StoreId { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 是否有效 | |
| 62 | + /// </summary> | |
| 63 | + [Display(Name = "是否有效", Description = "根据是否有效筛选")] | |
| 64 | + public int? IsEffective { get; set; } | |
| 65 | + } | |
| 66 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyStudentListOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 学习学员列表输出 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyStudentListOutput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 学员ID | |
| 13 | + /// </summary> | |
| 14 | + [Display(Name = "学员ID")] | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 员工姓名 | |
| 19 | + /// </summary> | |
| 20 | + [Display(Name = "员工姓名")] | |
| 21 | + public string employeeName { get; set; } | |
| 22 | + | |
| 23 | + /// <summary> | |
| 24 | + /// 员工电话 | |
| 25 | + /// </summary> | |
| 26 | + [Display(Name = "员工电话")] | |
| 27 | + public string employeePhone { get; set; } | |
| 28 | + | |
| 29 | + /// <summary> | |
| 30 | + /// 员工ID | |
| 31 | + /// </summary> | |
| 32 | + [Display(Name = "员工ID")] | |
| 33 | + public string employeeId { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 入院时间 | |
| 37 | + /// </summary> | |
| 38 | + [Display(Name = "入院时间")] | |
| 39 | + public DateTime admissionTime { get; set; } | |
| 40 | + | |
| 41 | + /// <summary> | |
| 42 | + /// 班级ID | |
| 43 | + /// </summary> | |
| 44 | + [Display(Name = "班级ID")] | |
| 45 | + public string classId { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 所属班级 | |
| 49 | + /// </summary> | |
| 50 | + [Display(Name = "所属班级")] | |
| 51 | + public string className { get; set; } | |
| 52 | + | |
| 53 | + /// <summary> | |
| 54 | + /// HR归属 | |
| 55 | + /// </summary> | |
| 56 | + [Display(Name = "HR归属")] | |
| 57 | + public string hrBelong { get; set; } | |
| 58 | + | |
| 59 | + /// <summary> | |
| 60 | + /// 创建人ID | |
| 61 | + /// </summary> | |
| 62 | + [Display(Name = "创建人ID")] | |
| 63 | + public string createUser { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 创建人姓名 | |
| 67 | + /// </summary> | |
| 68 | + [Display(Name = "创建人姓名")] | |
| 69 | + public string createUserName { get; set; } | |
| 70 | + | |
| 71 | + /// <summary> | |
| 72 | + /// 创建时间 | |
| 73 | + /// </summary> | |
| 74 | + [Display(Name = "创建时间")] | |
| 75 | + public DateTime createTime { get; set; } | |
| 76 | + | |
| 77 | + /// <summary> | |
| 78 | + /// 更新人ID | |
| 79 | + /// </summary> | |
| 80 | + [Display(Name = "更新人ID")] | |
| 81 | + public string updateUser { get; set; } | |
| 82 | + | |
| 83 | + /// <summary> | |
| 84 | + /// 更新人姓名 | |
| 85 | + /// </summary> | |
| 86 | + [Display(Name = "更新人姓名")] | |
| 87 | + public string updateUserName { get; set; } | |
| 88 | + | |
| 89 | + /// <summary> | |
| 90 | + /// 更新时间 | |
| 91 | + /// </summary> | |
| 92 | + [Display(Name = "更新时间")] | |
| 93 | + public DateTime? updateTime { get; set; } | |
| 94 | + | |
| 95 | + /// <summary> | |
| 96 | + /// 是否有效 | |
| 97 | + /// </summary> | |
| 98 | + [Display(Name = "是否有效")] | |
| 99 | + public int isEffective { get; set; } | |
| 100 | + } | |
| 101 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyClass/LqStudyStudentListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System; | |
| 3 | +using System.ComponentModel.DataAnnotations; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.Dto.LqStudyClass | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 学习学员列表查询输入 | |
| 9 | + /// </summary> | |
| 10 | + public class LqStudyStudentListQueryInput : PageInputBase | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 班级ID | |
| 14 | + /// </summary> | |
| 15 | + [Required(ErrorMessage = "班级ID不能为空")] | |
| 16 | + [Display(Name = "班级ID", Description = "根据班级ID筛选学员")] | |
| 17 | + public string ClassId { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 员工姓名 | |
| 21 | + /// </summary> | |
| 22 | + [Display(Name = "员工姓名", Description = "根据员工姓名筛选")] | |
| 23 | + public string EmployeeName { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 员工电话 | |
| 27 | + /// </summary> | |
| 28 | + [Display(Name = "员工电话", Description = "根据员工电话筛选")] | |
| 29 | + public string EmployeePhone { get; set; } | |
| 30 | + | |
| 31 | + /// <summary> | |
| 32 | + /// 员工ID | |
| 33 | + /// </summary> | |
| 34 | + [Display(Name = "员工ID", Description = "根据员工ID筛选")] | |
| 35 | + public string EmployeeId { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// HR归属 | |
| 39 | + /// </summary> | |
| 40 | + [Display(Name = "HR归属", Description = "根据HR归属筛选")] | |
| 41 | + public string HrBelong { get; set; } | |
| 42 | + | |
| 43 | + /// <summary> | |
| 44 | + /// 是否有效 | |
| 45 | + /// </summary> | |
| 46 | + [Display(Name = "是否有效", Description = "根据是否有效筛选")] | |
| 47 | + public int? IsEffective { get; set; } | |
| 48 | + } | |
| 49 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyRecord | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 学习记录创建输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyRecordCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 员工姓名 | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "员工姓名不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "员工姓名长度不能超过50个字符")] | |
| 16 | + [Display(Name = "员工姓名")] | |
| 17 | + public string EmployeeName { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 员工ID | |
| 21 | + /// </summary> | |
| 22 | + [Required(ErrorMessage = "员工ID不能为空")] | |
| 23 | + [StringLength(50, ErrorMessage = "员工ID长度不能超过50个字符")] | |
| 24 | + [Display(Name = "员工ID")] | |
| 25 | + public string EmployeeId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 学习类型 | |
| 29 | + /// </summary> | |
| 30 | + [Required(ErrorMessage = "学习类型不能为空")] | |
| 31 | + [StringLength(50, ErrorMessage = "学习类型长度不能超过50个字符")] | |
| 32 | + [Display(Name = "学习类型")] | |
| 33 | + public string StudyType { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 交通费 | |
| 37 | + /// </summary> | |
| 38 | + [Range(0, double.MaxValue, ErrorMessage = "交通费不能小于0")] | |
| 39 | + [Display(Name = "交通费")] | |
| 40 | + public decimal? TransportFee { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 学习日期 | |
| 44 | + /// </summary> | |
| 45 | + [Required(ErrorMessage = "学习日期不能为空")] | |
| 46 | + [Display(Name = "学习日期")] | |
| 47 | + public DateTime StudyDate { get; set; } | |
| 48 | + | |
| 49 | + /// <summary> | |
| 50 | + /// 当日状态 | |
| 51 | + /// </summary> | |
| 52 | + [Required(ErrorMessage = "当日状态不能为空")] | |
| 53 | + [StringLength(50, ErrorMessage = "当日状态长度不能超过50个字符")] | |
| 54 | + [Display(Name = "当日状态")] | |
| 55 | + public string DailyStatus { get; set; } | |
| 56 | + | |
| 57 | + /// <summary> | |
| 58 | + /// 备注 | |
| 59 | + /// </summary> | |
| 60 | + [StringLength(1000, ErrorMessage = "备注长度不能超过1000个字符")] | |
| 61 | + [Display(Name = "备注")] | |
| 62 | + public string Remark { get; set; } | |
| 63 | + | |
| 64 | + /// <summary> | |
| 65 | + /// 是否下店协助(1:是 0:否) | |
| 66 | + /// </summary> | |
| 67 | + [Display(Name = "是否下店协助")] | |
| 68 | + public int IsStoreAssist { get; set; } = 0; | |
| 69 | + | |
| 70 | + /// <summary> | |
| 71 | + /// 下店门店ID | |
| 72 | + /// </summary> | |
| 73 | + [StringLength(50, ErrorMessage = "下店门店ID长度不能超过50个字符")] | |
| 74 | + [Display(Name = "下店门店ID")] | |
| 75 | + public string StoreId { get; set; } | |
| 76 | + | |
| 77 | + /// <summary> | |
| 78 | + /// 下店门店名称 | |
| 79 | + /// </summary> | |
| 80 | + [StringLength(100, ErrorMessage = "下店门店名称长度不能超过100个字符")] | |
| 81 | + [Display(Name = "下店门店名称")] | |
| 82 | + public string StoreName { get; set; } | |
| 83 | + } | |
| 84 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStudyRecord | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 学习记录详情输出 | |
| 7 | + /// </summary> | |
| 8 | + public class LqStudyRecordInfoOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 学习记录ID | |
| 12 | + /// </summary> | |
| 13 | + public string Id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 员工姓名 | |
| 17 | + /// </summary> | |
| 18 | + public string EmployeeName { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 员工ID | |
| 22 | + /// </summary> | |
| 23 | + public string EmployeeId { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 学习类型 | |
| 27 | + /// </summary> | |
| 28 | + public string StudyType { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 交通费 | |
| 32 | + /// </summary> | |
| 33 | + public decimal? TransportFee { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 学习日期 | |
| 37 | + /// </summary> | |
| 38 | + public DateTime StudyDate { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 当日状态 | |
| 42 | + /// </summary> | |
| 43 | + public string DailyStatus { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 备注 | |
| 47 | + /// </summary> | |
| 48 | + public string Remark { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 是否下店协助(1:是 0:否) | |
| 52 | + /// </summary> | |
| 53 | + public int IsStoreAssist { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 下店门店ID | |
| 57 | + /// </summary> | |
| 58 | + public string StoreId { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 下店门店名称 | |
| 62 | + /// </summary> | |
| 63 | + public string StoreName { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 创建人ID | |
| 67 | + /// </summary> | |
| 68 | + public string CreateUser { get; set; } | |
| 69 | + | |
| 70 | + /// <summary> | |
| 71 | + /// 创建人姓名 | |
| 72 | + /// </summary> | |
| 73 | + public string CreateUserName { get; set; } | |
| 74 | + | |
| 75 | + /// <summary> | |
| 76 | + /// 创建时间 | |
| 77 | + /// </summary> | |
| 78 | + public DateTime CreateTime { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 更新人ID | |
| 82 | + /// </summary> | |
| 83 | + public string UpdateUser { get; set; } | |
| 84 | + | |
| 85 | + /// <summary> | |
| 86 | + /// 更新人姓名 | |
| 87 | + /// </summary> | |
| 88 | + public string UpdateUserName { get; set; } | |
| 89 | + | |
| 90 | + /// <summary> | |
| 91 | + /// 更新时间 | |
| 92 | + /// </summary> | |
| 93 | + public DateTime? UpdateTime { get; set; } | |
| 94 | + | |
| 95 | + /// <summary> | |
| 96 | + /// 是否有效(1:有效 0:无效) | |
| 97 | + /// </summary> | |
| 98 | + public int IsEffective { get; set; } | |
| 99 | + } | |
| 100 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordListOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStudyRecord | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 学习记录列表输出 | |
| 7 | + /// </summary> | |
| 8 | + public class LqStudyRecordListOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 学习记录ID | |
| 12 | + /// </summary> | |
| 13 | + public string Id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 员工姓名 | |
| 17 | + /// </summary> | |
| 18 | + public string EmployeeName { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 员工ID | |
| 22 | + /// </summary> | |
| 23 | + public string EmployeeId { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 学习类型 | |
| 27 | + /// </summary> | |
| 28 | + public string StudyType { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 交通费 | |
| 32 | + /// </summary> | |
| 33 | + public decimal? TransportFee { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 学习日期 | |
| 37 | + /// </summary> | |
| 38 | + public DateTime StudyDate { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 当日状态 | |
| 42 | + /// </summary> | |
| 43 | + public string DailyStatus { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 备注 | |
| 47 | + /// </summary> | |
| 48 | + public string Remark { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 是否下店协助(1:是 0:否) | |
| 52 | + /// </summary> | |
| 53 | + public int IsStoreAssist { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 下店门店ID | |
| 57 | + /// </summary> | |
| 58 | + public string StoreId { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 下店门店名称 | |
| 62 | + /// </summary> | |
| 63 | + public string StoreName { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 创建人ID | |
| 67 | + /// </summary> | |
| 68 | + public string CreateUser { get; set; } | |
| 69 | + | |
| 70 | + /// <summary> | |
| 71 | + /// 创建人姓名 | |
| 72 | + /// </summary> | |
| 73 | + public string CreateUserName { get; set; } | |
| 74 | + | |
| 75 | + /// <summary> | |
| 76 | + /// 创建时间 | |
| 77 | + /// </summary> | |
| 78 | + public DateTime CreateTime { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 更新人ID | |
| 82 | + /// </summary> | |
| 83 | + public string UpdateUser { get; set; } | |
| 84 | + | |
| 85 | + /// <summary> | |
| 86 | + /// 更新人姓名 | |
| 87 | + /// </summary> | |
| 88 | + public string UpdateUserName { get; set; } | |
| 89 | + | |
| 90 | + /// <summary> | |
| 91 | + /// 更新时间 | |
| 92 | + /// </summary> | |
| 93 | + public DateTime? UpdateTime { get; set; } | |
| 94 | + | |
| 95 | + /// <summary> | |
| 96 | + /// 是否有效(1:有效 0:无效) | |
| 97 | + /// </summary> | |
| 98 | + public int IsEffective { get; set; } | |
| 99 | + } | |
| 100 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStudyRecord | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 学习记录列表查询输入 | |
| 7 | + /// </summary> | |
| 8 | + public class LqStudyRecordListQueryInput : PageInputBase | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 员工姓名 | |
| 12 | + /// </summary> | |
| 13 | + public string EmployeeName { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 员工ID | |
| 17 | + /// </summary> | |
| 18 | + public string EmployeeId { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 学习类型 | |
| 22 | + /// </summary> | |
| 23 | + public string StudyType { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 学习开始日期 | |
| 27 | + /// </summary> | |
| 28 | + public System.DateTime? StudyStartDate { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 学习结束日期 | |
| 32 | + /// </summary> | |
| 33 | + public System.DateTime? StudyEndDate { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 当日状态 | |
| 37 | + /// </summary> | |
| 38 | + public string DailyStatus { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 是否下店协助 | |
| 42 | + /// </summary> | |
| 43 | + public int? IsStoreAssist { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 下店门店ID | |
| 47 | + /// </summary> | |
| 48 | + public string StoreId { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 是否有效 | |
| 52 | + /// </summary> | |
| 53 | + public int? IsEffective { get; set; } | |
| 54 | + } | |
| 55 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyRecord/LqStudyRecordUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyRecord | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 学习记录更新输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyRecordUpInput : LqStudyRecordCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 学习记录ID | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "学习记录ID不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "学习记录ID长度不能超过50个字符")] | |
| 16 | + [Display(Name = "学习记录ID")] | |
| 17 | + public string Id { get; set; } | |
| 18 | + } | |
| 19 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyStudent | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 学习学员创建输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyStudentCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 员工姓名 | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "员工姓名不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "员工姓名长度不能超过50个字符")] | |
| 16 | + [Display(Name = "员工姓名")] | |
| 17 | + public string EmployeeName { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 员工电话 | |
| 21 | + /// </summary> | |
| 22 | + [Required(ErrorMessage = "员工电话不能为空")] | |
| 23 | + [StringLength(20, ErrorMessage = "员工电话长度不能超过20个字符")] | |
| 24 | + [Display(Name = "员工电话")] | |
| 25 | + public string EmployeePhone { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 员工ID | |
| 29 | + /// </summary> | |
| 30 | + [Required(ErrorMessage = "员工ID不能为空")] | |
| 31 | + [StringLength(50, ErrorMessage = "员工ID长度不能超过50个字符")] | |
| 32 | + [Display(Name = "员工ID")] | |
| 33 | + public string EmployeeId { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 入院时间 | |
| 37 | + /// </summary> | |
| 38 | + [Required(ErrorMessage = "入院时间不能为空")] | |
| 39 | + [Display(Name = "入院时间")] | |
| 40 | + public DateTime AdmissionTime { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 班级ID | |
| 44 | + /// </summary> | |
| 45 | + [Required(ErrorMessage = "班级ID不能为空")] | |
| 46 | + [StringLength(50, ErrorMessage = "班级ID长度不能超过50个字符")] | |
| 47 | + [Display(Name = "班级ID")] | |
| 48 | + public string ClassId { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 所属班级 | |
| 52 | + /// </summary> | |
| 53 | + [Required(ErrorMessage = "所属班级不能为空")] | |
| 54 | + [StringLength(100, ErrorMessage = "所属班级长度不能超过100个字符")] | |
| 55 | + [Display(Name = "所属班级")] | |
| 56 | + public string ClassName { get; set; } | |
| 57 | + | |
| 58 | + /// <summary> | |
| 59 | + /// HR归属 | |
| 60 | + /// </summary> | |
| 61 | + [StringLength(50, ErrorMessage = "HR归属长度不能超过50个字符")] | |
| 62 | + [Display(Name = "HR归属")] | |
| 63 | + public string HrBelong { get; set; } | |
| 64 | + } | |
| 65 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStudyStudent | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 学习学员详情输出 | |
| 7 | + /// </summary> | |
| 8 | + public class LqStudyStudentInfoOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 学员ID | |
| 12 | + /// </summary> | |
| 13 | + public string Id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 员工姓名 | |
| 17 | + /// </summary> | |
| 18 | + public string EmployeeName { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 员工电话 | |
| 22 | + /// </summary> | |
| 23 | + public string EmployeePhone { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 员工ID | |
| 27 | + /// </summary> | |
| 28 | + public string EmployeeId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 入院时间 | |
| 32 | + /// </summary> | |
| 33 | + public DateTime AdmissionTime { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 班级ID | |
| 37 | + /// </summary> | |
| 38 | + public string ClassId { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 所属班级 | |
| 42 | + /// </summary> | |
| 43 | + public string ClassName { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// HR归属 | |
| 47 | + /// </summary> | |
| 48 | + public string HrBelong { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 创建人ID | |
| 52 | + /// </summary> | |
| 53 | + public string CreateUser { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 创建人姓名 | |
| 57 | + /// </summary> | |
| 58 | + public string CreateUserName { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 创建时间 | |
| 62 | + /// </summary> | |
| 63 | + public DateTime CreateTime { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 更新人ID | |
| 67 | + /// </summary> | |
| 68 | + public string UpdateUser { get; set; } | |
| 69 | + | |
| 70 | + /// <summary> | |
| 71 | + /// 更新人姓名 | |
| 72 | + /// </summary> | |
| 73 | + public string UpdateUserName { get; set; } | |
| 74 | + | |
| 75 | + /// <summary> | |
| 76 | + /// 更新时间 | |
| 77 | + /// </summary> | |
| 78 | + public DateTime? UpdateTime { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 是否有效(1:有效 0:无效) | |
| 82 | + /// </summary> | |
| 83 | + public int IsEffective { get; set; } | |
| 84 | + | |
| 85 | + /// <summary> | |
| 86 | + /// 学习记录数量 | |
| 87 | + /// </summary> | |
| 88 | + public int RecordCount { get; set; } | |
| 89 | + | |
| 90 | + /// <summary> | |
| 91 | + /// 总交通费 | |
| 92 | + /// </summary> | |
| 93 | + public decimal TotalTransportFee { get; set; } | |
| 94 | + | |
| 95 | + /// <summary> | |
| 96 | + /// 下店协助次数 | |
| 97 | + /// </summary> | |
| 98 | + public int StoreAssistCount { get; set; } | |
| 99 | + } | |
| 100 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentListOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStudyStudent | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 学习学员列表输出 | |
| 7 | + /// </summary> | |
| 8 | + public class LqStudyStudentListOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 学员ID | |
| 12 | + /// </summary> | |
| 13 | + public string Id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 员工姓名 | |
| 17 | + /// </summary> | |
| 18 | + public string EmployeeName { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 员工电话 | |
| 22 | + /// </summary> | |
| 23 | + public string EmployeePhone { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 员工ID | |
| 27 | + /// </summary> | |
| 28 | + public string EmployeeId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 入院时间 | |
| 32 | + /// </summary> | |
| 33 | + public DateTime AdmissionTime { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 班级ID | |
| 37 | + /// </summary> | |
| 38 | + public string ClassId { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 所属班级 | |
| 42 | + /// </summary> | |
| 43 | + public string ClassName { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// HR归属 | |
| 47 | + /// </summary> | |
| 48 | + public string HrBelong { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 创建人ID | |
| 52 | + /// </summary> | |
| 53 | + public string CreateUser { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 创建人姓名 | |
| 57 | + /// </summary> | |
| 58 | + public string CreateUserName { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 创建时间 | |
| 62 | + /// </summary> | |
| 63 | + public DateTime CreateTime { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 更新人ID | |
| 67 | + /// </summary> | |
| 68 | + public string UpdateUser { get; set; } | |
| 69 | + | |
| 70 | + /// <summary> | |
| 71 | + /// 更新人姓名 | |
| 72 | + /// </summary> | |
| 73 | + public string UpdateUserName { get; set; } | |
| 74 | + | |
| 75 | + /// <summary> | |
| 76 | + /// 更新时间 | |
| 77 | + /// </summary> | |
| 78 | + public DateTime? UpdateTime { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 是否有效(1:有效 0:无效) | |
| 82 | + /// </summary> | |
| 83 | + public int IsEffective { get; set; } | |
| 84 | + | |
| 85 | + /// <summary> | |
| 86 | + /// 学习记录数量 | |
| 87 | + /// </summary> | |
| 88 | + public int RecordCount { get; set; } | |
| 89 | + } | |
| 90 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStudyStudent | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 学习学员列表查询输入 | |
| 7 | + /// </summary> | |
| 8 | + public class LqStudyStudentListQueryInput : PageInputBase | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 员工姓名 | |
| 12 | + /// </summary> | |
| 13 | + public string EmployeeName { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 员工电话 | |
| 17 | + /// </summary> | |
| 18 | + public string EmployeePhone { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 员工ID | |
| 22 | + /// </summary> | |
| 23 | + public string EmployeeId { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 班级ID | |
| 27 | + /// </summary> | |
| 28 | + public string ClassId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 所属班级 | |
| 32 | + /// </summary> | |
| 33 | + public string ClassName { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// HR归属 | |
| 37 | + /// </summary> | |
| 38 | + public string HrBelong { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 入院开始时间 | |
| 42 | + /// </summary> | |
| 43 | + public System.DateTime? AdmissionStartTime { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 入院结束时间 | |
| 47 | + /// </summary> | |
| 48 | + public System.DateTime? AdmissionEndTime { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 是否有效 | |
| 52 | + /// </summary> | |
| 53 | + public int? IsEffective { get; set; } | |
| 54 | + } | |
| 55 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStudyStudent/LqStudyStudentUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.ComponentModel.DataAnnotations; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqStudyStudent | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 学习学员更新输入 | |
| 8 | + /// </summary> | |
| 9 | + public class LqStudyStudentUpInput : LqStudyStudentCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 学员ID | |
| 13 | + /// </summary> | |
| 14 | + [Required(ErrorMessage = "学员ID不能为空")] | |
| 15 | + [StringLength(50, ErrorMessage = "学员ID长度不能超过50个字符")] | |
| 16 | + [Display(Name = "学员ID")] | |
| 17 | + public string Id { get; set; } | |
| 18 | + } | |
| 19 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_inventory/LqInventoryEntity.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using NCC.Common.Const; | |
| 3 | +using SqlSugar; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.lq_inventory | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 库存表 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("lq_inventory")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class LqInventoryEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 库存ID | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 产品名称 | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_ProductName")] | |
| 24 | + public string ProductName { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 价格 | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_Price")] | |
| 30 | + public decimal Price { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 数量 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_Quantity")] | |
| 36 | + public int Quantity { get; set; } = 0; | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 产品类别 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_ProductCategory")] | |
| 42 | + public string ProductCategory { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 归属部门ID | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_DepartmentId")] | |
| 48 | + public string DepartmentId { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 标准单位 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_StandardUnit")] | |
| 54 | + public string StandardUnit { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 创建人ID | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_CreateUser")] | |
| 60 | + public string CreateUser { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 创建时间 | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_CreateTime")] | |
| 66 | + public DateTime CreateTime { get; set; } | |
| 67 | + | |
| 68 | + /// <summary> | |
| 69 | + /// 更新人ID | |
| 70 | + /// </summary> | |
| 71 | + [SugarColumn(ColumnName = "F_UpdateUser")] | |
| 72 | + public string UpdateUser { get; set; } | |
| 73 | + | |
| 74 | + /// <summary> | |
| 75 | + /// 更新时间 | |
| 76 | + /// </summary> | |
| 77 | + [SugarColumn(ColumnName = "F_UpdateTime")] | |
| 78 | + public DateTime? UpdateTime { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 是否有效(1:有效 0:无效) | |
| 82 | + /// </summary> | |
| 83 | + [SugarColumn(ColumnName = "F_IsEffective")] | |
| 84 | + public int IsEffective { get; set; } = 1; | |
| 85 | + } | |
| 86 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_inventory_usage/LqInventoryUsageEntity.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using NCC.Common.Const; | |
| 3 | +using SqlSugar; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.lq_inventory_usage | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 库存使用记录表 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("lq_inventory_usage")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class LqInventoryUsageEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 使用记录ID | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 产品ID | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_ProductId")] | |
| 24 | + public string ProductId { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 门店ID | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_StoreId")] | |
| 30 | + public string StoreId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 使用时间 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_UsageTime")] | |
| 36 | + public DateTime UsageTime { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 使用数量 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_UsageQuantity")] | |
| 42 | + public int UsageQuantity { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 关联消耗ID | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_RelatedConsumeId")] | |
| 48 | + public string RelatedConsumeId { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 创建人ID | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_CreateUser")] | |
| 54 | + public string CreateUser { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 创建时间 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_CreateTime")] | |
| 60 | + public DateTime CreateTime { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 更新人ID | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_UpdateUser")] | |
| 66 | + public string UpdateUser { get; set; } | |
| 67 | + | |
| 68 | + /// <summary> | |
| 69 | + /// 更新时间 | |
| 70 | + /// </summary> | |
| 71 | + [SugarColumn(ColumnName = "F_UpdateTime")] | |
| 72 | + public DateTime? UpdateTime { get; set; } | |
| 73 | + | |
| 74 | + /// <summary> | |
| 75 | + /// 是否有效(1:有效 0:无效) | |
| 76 | + /// </summary> | |
| 77 | + [SugarColumn(ColumnName = "F_IsEffective")] | |
| 78 | + public int IsEffective { get; set; } = 1; | |
| 79 | + } | |
| 80 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_class/LqStudyClassEntity.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using NCC.Common.Const; | |
| 3 | +using SqlSugar; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.lq_study_class | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 学习班级表 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("lq_study_class")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class LqStudyClassEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 班级ID | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 班级名称 | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_ClassName")] | |
| 24 | + public string ClassName { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 任教老师ID | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_TeacherId")] | |
| 30 | + public string TeacherId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 开始时间 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_StartTime")] | |
| 36 | + public DateTime StartTime { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 结束时间 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_EndTime")] | |
| 42 | + public DateTime EndTime { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 备注 | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_Remark")] | |
| 48 | + public string Remark { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 创建人ID | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_CreateUser")] | |
| 54 | + public string CreateUser { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 创建时间 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_CreateTime")] | |
| 60 | + public DateTime CreateTime { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 更新人ID | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_UpdateUser")] | |
| 66 | + public string UpdateUser { get; set; } | |
| 67 | + | |
| 68 | + /// <summary> | |
| 69 | + /// 更新时间 | |
| 70 | + /// </summary> | |
| 71 | + [SugarColumn(ColumnName = "F_UpdateTime")] | |
| 72 | + public DateTime? UpdateTime { get; set; } | |
| 73 | + | |
| 74 | + /// <summary> | |
| 75 | + /// 是否有效(1:有效 0:无效) | |
| 76 | + /// </summary> | |
| 77 | + [SugarColumn(ColumnName = "F_IsEffective")] | |
| 78 | + public int IsEffective { get; set; } = 1; | |
| 79 | + } | |
| 80 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_record/LqStudyRecordEntity.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using NCC.Common.Const; | |
| 3 | +using SqlSugar; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.lq_study_record | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 学习记录表 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("lq_study_record")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class LqStudyRecordEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 学习记录ID | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 员工姓名 | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_EmployeeName")] | |
| 24 | + public string EmployeeName { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 员工ID | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_EmployeeId")] | |
| 30 | + public string EmployeeId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 学习类型 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_StudyType")] | |
| 36 | + public string StudyType { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 交通费 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_TransportFee")] | |
| 42 | + public decimal? TransportFee { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 学习日期 | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_StudyDate")] | |
| 48 | + public DateTime StudyDate { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 当日状态 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_DailyStatus")] | |
| 54 | + public string DailyStatus { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 备注 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_Remark")] | |
| 60 | + public string Remark { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 是否下店协助(1:是 0:否) | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_IsStoreAssist")] | |
| 66 | + public int IsStoreAssist { get; set; } = 0; | |
| 67 | + | |
| 68 | + /// <summary> | |
| 69 | + /// 下店门店ID | |
| 70 | + /// </summary> | |
| 71 | + [SugarColumn(ColumnName = "F_StoreId")] | |
| 72 | + public string StoreId { get; set; } | |
| 73 | + | |
| 74 | + /// <summary> | |
| 75 | + /// 下店门店名称 | |
| 76 | + /// </summary> | |
| 77 | + [SugarColumn(ColumnName = "F_StoreName")] | |
| 78 | + public string StoreName { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 创建人ID | |
| 82 | + /// </summary> | |
| 83 | + [SugarColumn(ColumnName = "F_CreateUser")] | |
| 84 | + public string CreateUser { get; set; } | |
| 85 | + | |
| 86 | + /// <summary> | |
| 87 | + /// 创建时间 | |
| 88 | + /// </summary> | |
| 89 | + [SugarColumn(ColumnName = "F_CreateTime")] | |
| 90 | + public DateTime CreateTime { get; set; } | |
| 91 | + | |
| 92 | + /// <summary> | |
| 93 | + /// 更新人ID | |
| 94 | + /// </summary> | |
| 95 | + [SugarColumn(ColumnName = "F_UpdateUser")] | |
| 96 | + public string UpdateUser { get; set; } | |
| 97 | + | |
| 98 | + /// <summary> | |
| 99 | + /// 更新时间 | |
| 100 | + /// </summary> | |
| 101 | + [SugarColumn(ColumnName = "F_UpdateTime")] | |
| 102 | + public DateTime? UpdateTime { get; set; } | |
| 103 | + | |
| 104 | + /// <summary> | |
| 105 | + /// 是否有效(1:有效 0:无效) | |
| 106 | + /// </summary> | |
| 107 | + [SugarColumn(ColumnName = "F_IsEffective")] | |
| 108 | + public int IsEffective { get; set; } = 1; | |
| 109 | + } | |
| 110 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_study_student/LqStudyStudentEntity.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using NCC.Common.Const; | |
| 3 | +using SqlSugar; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.lq_study_student | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 学习学员表 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("lq_study_student")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class LqStudyStudentEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 学员ID | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 员工姓名 | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_EmployeeName")] | |
| 24 | + public string EmployeeName { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 员工电话 | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_EmployeePhone")] | |
| 30 | + public string EmployeePhone { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 员工ID | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_EmployeeId")] | |
| 36 | + public string EmployeeId { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 入院时间 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_AdmissionTime")] | |
| 42 | + public DateTime AdmissionTime { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 班级ID | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_ClassId")] | |
| 48 | + public string ClassId { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 所属班级 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_ClassName")] | |
| 54 | + public string ClassName { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// HR归属 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_HrBelong")] | |
| 60 | + public string HrBelong { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 创建人ID | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_CreateUser")] | |
| 66 | + public string CreateUser { get; set; } | |
| 67 | + | |
| 68 | + /// <summary> | |
| 69 | + /// 创建时间 | |
| 70 | + /// </summary> | |
| 71 | + [SugarColumn(ColumnName = "F_CreateTime")] | |
| 72 | + public DateTime CreateTime { get; set; } | |
| 73 | + | |
| 74 | + /// <summary> | |
| 75 | + /// 更新人ID | |
| 76 | + /// </summary> | |
| 77 | + [SugarColumn(ColumnName = "F_UpdateUser")] | |
| 78 | + public string UpdateUser { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 更新时间 | |
| 82 | + /// </summary> | |
| 83 | + [SugarColumn(ColumnName = "F_UpdateTime")] | |
| 84 | + public DateTime? UpdateTime { get; set; } | |
| 85 | + | |
| 86 | + /// <summary> | |
| 87 | + /// 是否有效(1:有效 0:无效) | |
| 88 | + /// </summary> | |
| 89 | + [SugarColumn(ColumnName = "F_IsEffective")] | |
| 90 | + public int IsEffective { get; set; } = 1; | |
| 91 | + | |
| 92 | + /// <summary> | |
| 93 | + /// 删除标记(0:未删除 1:已删除) | |
| 94 | + /// </summary> | |
| 95 | + [SugarColumn(ColumnName = "F_DeleteMark")] | |
| 96 | + public int? DeleteMark { get; set; } | |
| 97 | + } | |
| 98 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqInventory/ILqInventoryService.cs
0 → 100644
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqInventoryUsage/ILqInventoryUsageService.cs
0 → 100644
| 1 | +using System.Threading.Tasks; | |
| 2 | +using NCC.Extend.Entitys.Dto.LqInventoryUsage; | |
| 3 | +using NCC.Common.Filter; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Interfaces.LqInventoryUsage | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 库存使用记录服务接口 | |
| 9 | + /// </summary> | |
| 10 | + public interface ILqInventoryUsageService | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 添加库存使用记录 | |
| 14 | + /// </summary> | |
| 15 | + /// <param name="input">创建输入</param> | |
| 16 | + /// <returns></returns> | |
| 17 | + Task CreateAsync(LqInventoryUsageCrInput input); | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 作废库存使用记录 | |
| 21 | + /// </summary> | |
| 22 | + /// <param name="id">使用记录ID</param> | |
| 23 | + /// <param name="remarks">作废备注</param> | |
| 24 | + /// <returns></returns> | |
| 25 | + Task CancelAsync(string id, string remarks = null); | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 获取使用记录列表 | |
| 29 | + /// </summary> | |
| 30 | + /// <param name="input">查询输入</param> | |
| 31 | + /// <returns></returns> | |
| 32 | + Task<dynamic> GetListAsync(LqInventoryUsageListQueryInput input); | |
| 33 | + | |
| 34 | + /// <summary> | |
| 35 | + /// 统计时间周期内每个产品的使用数量 | |
| 36 | + /// </summary> | |
| 37 | + /// <param name="input">统计查询输入</param> | |
| 38 | + /// <returns></returns> | |
| 39 | + Task<dynamic> GetProductUsageStatisticsAsync(LqInventoryUsageStatisticsInput input); | |
| 40 | + | |
| 41 | + /// <summary> | |
| 42 | + /// 统计时间周期内每个门店的使用情况 | |
| 43 | + /// </summary> | |
| 44 | + /// <param name="input">统计查询输入</param> | |
| 45 | + /// <returns></returns> | |
| 46 | + Task<dynamic> GetStoreUsageStatisticsAsync(LqInventoryUsageStatisticsInput input); | |
| 47 | + | |
| 48 | + /// <summary> | |
| 49 | + /// 统计时间周期内使用趋势 | |
| 50 | + /// </summary> | |
| 51 | + /// <param name="input">统计查询输入</param> | |
| 52 | + /// <returns></returns> | |
| 53 | + Task<dynamic> GetUsageTrendStatisticsAsync(LqInventoryUsageStatisticsInput input); | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 统计产品使用排行榜 | |
| 57 | + /// </summary> | |
| 58 | + /// <param name="input">统计查询输入</param> | |
| 59 | + /// <returns></returns> | |
| 60 | + Task<dynamic> GetProductUsageRankingAsync(LqInventoryUsageStatisticsInput input); | |
| 61 | + } | |
| 62 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqStudyClass/ILqStudyClassService.cs
0 → 100644
| 1 | +using System.Threading.Tasks; | |
| 2 | +using NCC.Extend.Entitys.Dto.LqStudyClass; | |
| 3 | +using NCC.Common.Filter; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Interfaces.LqStudyClass | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 学习班级服务接口 | |
| 9 | + /// </summary> | |
| 10 | + public interface ILqStudyClassService | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 创建学习班级并添加学员 | |
| 14 | + /// </summary> | |
| 15 | + /// <param name="input">创建输入</param> | |
| 16 | + /// <returns></returns> | |
| 17 | + Task<dynamic> CreateClassWithStudentsAsync(LqStudyClassCreateWithStudentsInput input); | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 向现有班级添加学员 | |
| 21 | + /// </summary> | |
| 22 | + /// <param name="input">添加学员输入</param> | |
| 23 | + /// <returns></returns> | |
| 24 | + Task<dynamic> AddStudentsToClassAsync(LqStudyClassAddStudentsInput input); | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 获取所有班级列表 | |
| 28 | + /// </summary> | |
| 29 | + /// <param name="input">查询输入</param> | |
| 30 | + /// <returns></returns> | |
| 31 | + Task<dynamic> GetClassListAsync(LqStudyClassListQueryInput input); | |
| 32 | + | |
| 33 | + /// <summary> | |
| 34 | + /// 获取班级下所有学员信息 | |
| 35 | + /// </summary> | |
| 36 | + /// <param name="input">查询输入</param> | |
| 37 | + /// <returns></returns> | |
| 38 | + Task<dynamic> GetStudentListByClassIdAsync(LqStudyStudentListQueryInput input); | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 添加学习记录 | |
| 42 | + /// </summary> | |
| 43 | + /// <param name="input">学习记录输入</param> | |
| 44 | + /// <returns></returns> | |
| 45 | + Task AddStudyRecordAsync(LqStudyRecordCreateInput input); | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 获取学习记录列表 | |
| 49 | + /// </summary> | |
| 50 | + /// <param name="input">查询输入</param> | |
| 51 | + /// <returns></returns> | |
| 52 | + Task<dynamic> GetStudyRecordListAsync(LqStudyRecordListQueryInput input); | |
| 53 | + } | |
| 54 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqInventoryService.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Threading.Tasks; | |
| 3 | +using Microsoft.AspNetCore.Mvc; | |
| 4 | +using Microsoft.Extensions.Logging; | |
| 5 | +using NCC.Common.Core.Manager; | |
| 6 | +using NCC.Common.Enum; | |
| 7 | +using NCC.Common.Filter; | |
| 8 | +using NCC.Dependency; | |
| 9 | +using NCC.DynamicApiController; | |
| 10 | +using NCC.Extend.Entitys.Dto.LqInventory; | |
| 11 | +using NCC.Extend.Entitys.Enum; | |
| 12 | +using NCC.Extend.Entitys.lq_inventory; | |
| 13 | +using NCC.Extend.Interfaces.LqInventory; | |
| 14 | +using NCC.FriendlyException; | |
| 15 | +using NCC.System.Entitys.Permission; | |
| 16 | +using SqlSugar; | |
| 17 | +using Yitter.IdGenerator; | |
| 18 | + | |
| 19 | +namespace NCC.Extend | |
| 20 | +{ | |
| 21 | + /// <summary> | |
| 22 | + /// 库存服务 | |
| 23 | + /// </summary> | |
| 24 | + [ApiDescriptionSettings(Tag = "绿纤库存管理", Name = "LqInventory", Order = 200)] | |
| 25 | + [Route("api/Extend/LqInventory")] | |
| 26 | + public class LqInventoryService : IDynamicApiController, ITransient, ILqInventoryService | |
| 27 | + { | |
| 28 | + private readonly IUserManager _userManager; | |
| 29 | + private readonly ILogger<LqInventoryService> _logger; | |
| 30 | + private readonly ISqlSugarClient _db; | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 构造函数 | |
| 34 | + /// </summary> | |
| 35 | + /// <param name="userManager">用户管理器</param> | |
| 36 | + /// <param name="logger">日志记录器</param> | |
| 37 | + /// <param name="db">数据库客户端</param> | |
| 38 | + public LqInventoryService(IUserManager userManager, ILogger<LqInventoryService> logger, ISqlSugarClient db) | |
| 39 | + { | |
| 40 | + _userManager = userManager; | |
| 41 | + _logger = logger; | |
| 42 | + _db = db; | |
| 43 | + } | |
| 44 | + | |
| 45 | + #region 创建库存 | |
| 46 | + /// <summary> | |
| 47 | + /// 创建库存 | |
| 48 | + /// </summary> | |
| 49 | + /// <param name="input">创建输入</param> | |
| 50 | + /// <returns>创建结果</returns> | |
| 51 | + [HttpPost("Create")] | |
| 52 | + public async Task CreateAsync([FromBody] LqInventoryCrInput input) | |
| 53 | + { | |
| 54 | + try | |
| 55 | + { | |
| 56 | + // 检查产品名称是否已存在 | |
| 57 | + var existingProduct = await _db.Queryable<LqInventoryEntity>() | |
| 58 | + .Where(x => x.ProductName == input.ProductName && x.IsEffective == StatusEnum.有效.GetHashCode()) | |
| 59 | + .FirstAsync(); | |
| 60 | + if (existingProduct != null) | |
| 61 | + { | |
| 62 | + throw NCCException.Oh($"产品名称'{input.ProductName}'已存在"); | |
| 63 | + } | |
| 64 | + | |
| 65 | + // 创建库存记录 | |
| 66 | + var inventoryEntity = new LqInventoryEntity | |
| 67 | + { | |
| 68 | + Id = YitIdHelper.NextId().ToString(), | |
| 69 | + ProductName = input.ProductName, | |
| 70 | + Price = input.Price, | |
| 71 | + Quantity = input.Quantity, | |
| 72 | + ProductCategory = input.ProductCategory, | |
| 73 | + DepartmentId = input.DepartmentId, | |
| 74 | + StandardUnit = input.StandardUnit, | |
| 75 | + CreateUser = _userManager.UserId, | |
| 76 | + CreateTime = DateTime.Now, | |
| 77 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 78 | + }; | |
| 79 | + | |
| 80 | + var isOk = await _db.Insertable(inventoryEntity).ExecuteCommandAsync(); | |
| 81 | + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 82 | + } | |
| 83 | + catch (Exception ex) | |
| 84 | + { | |
| 85 | + _logger.LogError(ex, "创建库存失败"); | |
| 86 | + throw NCCException.Oh($"创建失败:{ex.Message}"); | |
| 87 | + } | |
| 88 | + } | |
| 89 | + #endregion | |
| 90 | + | |
| 91 | + #region 更新库存 | |
| 92 | + /// <summary> | |
| 93 | + /// 更新库存 | |
| 94 | + /// </summary> | |
| 95 | + /// <param name="input">更新输入</param> | |
| 96 | + /// <returns>更新结果</returns> | |
| 97 | + [HttpPut("Update")] | |
| 98 | + public async Task UpdateAsync([FromBody] LqInventoryUpInput input) | |
| 99 | + { | |
| 100 | + try | |
| 101 | + { | |
| 102 | + // 检查库存记录是否存在 | |
| 103 | + var existingInventory = await _db.Queryable<LqInventoryEntity>() | |
| 104 | + .Where(x => x.Id == input.Id && x.IsEffective == StatusEnum.有效.GetHashCode()) | |
| 105 | + .FirstAsync(); | |
| 106 | + | |
| 107 | + if (existingInventory == null) | |
| 108 | + { | |
| 109 | + throw NCCException.Oh("库存记录不存在或已失效"); | |
| 110 | + } | |
| 111 | + | |
| 112 | + // 检查产品名称是否与其他记录重复 | |
| 113 | + var duplicateProduct = await _db.Queryable<LqInventoryEntity>() | |
| 114 | + .Where(x => x.ProductName == input.ProductName && x.Id != input.Id && x.IsEffective == StatusEnum.有效.GetHashCode()) | |
| 115 | + .FirstAsync(); | |
| 116 | + | |
| 117 | + if (duplicateProduct != null) | |
| 118 | + { | |
| 119 | + throw NCCException.Oh($"产品名称'{input.ProductName}'已存在"); | |
| 120 | + } | |
| 121 | + | |
| 122 | + // 更新库存记录 | |
| 123 | + existingInventory.ProductName = input.ProductName; | |
| 124 | + existingInventory.Price = input.Price; | |
| 125 | + existingInventory.Quantity = input.Quantity; | |
| 126 | + existingInventory.ProductCategory = input.ProductCategory; | |
| 127 | + existingInventory.DepartmentId = input.DepartmentId; | |
| 128 | + existingInventory.StandardUnit = input.StandardUnit; | |
| 129 | + existingInventory.UpdateUser = _userManager.UserId; | |
| 130 | + existingInventory.UpdateTime = DateTime.Now; | |
| 131 | + | |
| 132 | + var isOk = await _db.Updateable(existingInventory).ExecuteCommandAsync(); | |
| 133 | + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 134 | + } | |
| 135 | + catch (Exception ex) | |
| 136 | + { | |
| 137 | + _logger.LogError(ex, "更新库存失败"); | |
| 138 | + throw NCCException.Oh($"更新失败:{ex.Message}"); | |
| 139 | + } | |
| 140 | + } | |
| 141 | + #endregion | |
| 142 | + | |
| 143 | + #region 获取库存列表 | |
| 144 | + /// <summary> | |
| 145 | + /// 获取库存列表 | |
| 146 | + /// </summary> | |
| 147 | + /// <param name="input">查询输入</param> | |
| 148 | + /// <returns>库存列表</returns> | |
| 149 | + [HttpGet("GetList")] | |
| 150 | + public async Task<dynamic> GetListAsync([FromQuery] LqInventoryListQueryInput input) | |
| 151 | + { | |
| 152 | + try | |
| 153 | + { | |
| 154 | + var sidx = input.sidx == null ? "id" : input.sidx; | |
| 155 | + | |
| 156 | + // 查询库存信息 | |
| 157 | + var data = await _db.Queryable<LqInventoryEntity>() | |
| 158 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductName), x => x.ProductName.Contains(input.ProductName)) | |
| 159 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), x => x.ProductCategory.Contains(input.ProductCategory)) | |
| 160 | + .WhereIF(!string.IsNullOrWhiteSpace(input.DepartmentId), x => x.DepartmentId == input.DepartmentId) | |
| 161 | + .WhereIF(input.PriceMin.HasValue, x => x.Price >= input.PriceMin.Value) | |
| 162 | + .WhereIF(input.PriceMax.HasValue, x => x.Price <= input.PriceMax.Value) | |
| 163 | + .WhereIF(input.QuantityMin.HasValue, x => x.Quantity >= input.QuantityMin.Value) | |
| 164 | + .WhereIF(input.QuantityMax.HasValue, x => x.Quantity <= input.QuantityMax.Value) | |
| 165 | + .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value) | |
| 166 | + .Select(x => new LqInventoryListOutput | |
| 167 | + { | |
| 168 | + id = x.Id, | |
| 169 | + productName = x.ProductName, | |
| 170 | + price = x.Price, | |
| 171 | + quantity = x.Quantity, | |
| 172 | + productCategory = x.ProductCategory, | |
| 173 | + departmentId = x.DepartmentId, | |
| 174 | + departmentName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.DepartmentId).Select(u => u.RealName), | |
| 175 | + standardUnit = x.StandardUnit, | |
| 176 | + totalValue = x.Price * x.Quantity, | |
| 177 | + createUser = x.CreateUser, | |
| 178 | + createUserName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.CreateUser).Select(u => u.RealName), | |
| 179 | + createTime = x.CreateTime, | |
| 180 | + updateUser = x.UpdateUser, | |
| 181 | + updateUserName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.UpdateUser).Select(u => u.RealName), | |
| 182 | + updateTime = x.UpdateTime, | |
| 183 | + isEffective = x.IsEffective | |
| 184 | + }) | |
| 185 | + .MergeTable() | |
| 186 | + .OrderBy(sidx + " " + input.sort) | |
| 187 | + .ToPagedListAsync(input.currentPage, input.pageSize); | |
| 188 | + return PageResult<LqInventoryListOutput>.SqlSugarPageResult(data); | |
| 189 | + } | |
| 190 | + catch (Exception ex) | |
| 191 | + { | |
| 192 | + _logger.LogError(ex, "获取库存列表失败"); | |
| 193 | + throw NCCException.Oh($"获取库存列表失败:{ex.Message}"); | |
| 194 | + } | |
| 195 | + } | |
| 196 | + #endregion | |
| 197 | + | |
| 198 | + #region 获取库存详情 | |
| 199 | + /// <summary> | |
| 200 | + /// 获取库存详情 | |
| 201 | + /// </summary> | |
| 202 | + /// <param name="id">库存ID</param> | |
| 203 | + /// <returns>库存详情</returns> | |
| 204 | + [HttpGet("GetInfo")] | |
| 205 | + public async Task<dynamic> GetInfoAsync([FromQuery] string id) | |
| 206 | + { | |
| 207 | + try | |
| 208 | + { | |
| 209 | + if (string.IsNullOrWhiteSpace(id)) | |
| 210 | + { | |
| 211 | + throw NCCException.Oh("库存ID不能为空"); | |
| 212 | + } | |
| 213 | + var inventory = await _db.Queryable<LqInventoryEntity>().Where(x => x.Id == id).FirstAsync(); | |
| 214 | + | |
| 215 | + if (inventory == null) | |
| 216 | + { | |
| 217 | + throw NCCException.Oh("库存记录不存在"); | |
| 218 | + } | |
| 219 | + var result = new LqInventoryInfoOutput | |
| 220 | + { | |
| 221 | + id = inventory.Id, | |
| 222 | + productName = inventory.ProductName, | |
| 223 | + price = inventory.Price, | |
| 224 | + quantity = inventory.Quantity, | |
| 225 | + productCategory = inventory.ProductCategory, | |
| 226 | + departmentId = inventory.DepartmentId, | |
| 227 | + departmentName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == inventory.DepartmentId).Select(u => u.RealName), | |
| 228 | + standardUnit = inventory.StandardUnit, | |
| 229 | + totalValue = inventory.Price * inventory.Quantity, | |
| 230 | + createUser = inventory.CreateUser, | |
| 231 | + createUserName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == inventory.CreateUser).Select(u => u.RealName), | |
| 232 | + createTime = inventory.CreateTime, | |
| 233 | + updateUser = inventory.UpdateUser, | |
| 234 | + updateUserName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == inventory.UpdateUser).Select(u => u.RealName), | |
| 235 | + updateTime = inventory.UpdateTime, | |
| 236 | + isEffective = inventory.IsEffective | |
| 237 | + }; | |
| 238 | + | |
| 239 | + return result; | |
| 240 | + } | |
| 241 | + catch (Exception ex) | |
| 242 | + { | |
| 243 | + _logger.LogError(ex, "获取库存详情失败"); | |
| 244 | + throw NCCException.Oh($"获取库存详情失败:{ex.Message}"); | |
| 245 | + } | |
| 246 | + } | |
| 247 | + #endregion | |
| 248 | + | |
| 249 | + | |
| 250 | + } | |
| 251 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqInventoryUsageService.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Linq; | |
| 3 | +using System.Threading.Tasks; | |
| 4 | +using Microsoft.AspNetCore.Mvc; | |
| 5 | +using Microsoft.Extensions.Logging; | |
| 6 | +using NCC.Common.Core.Manager; | |
| 7 | +using NCC.Common.Enum; | |
| 8 | +using NCC.Common.Filter; | |
| 9 | +using NCC.Dependency; | |
| 10 | +using NCC.DynamicApiController; | |
| 11 | +using NCC.Extend.Entitys.Dto.LqInventoryUsage; | |
| 12 | +using NCC.Extend.Entitys.Enum; | |
| 13 | +using NCC.Extend.Entitys.lq_inventory; | |
| 14 | +using NCC.Extend.Entitys.lq_inventory_usage; | |
| 15 | +using NCC.Extend.Interfaces.LqInventoryUsage; | |
| 16 | +using NCC.FriendlyException; | |
| 17 | +using NCC.System.Entitys.Permission; | |
| 18 | +using SqlSugar; | |
| 19 | +using Yitter.IdGenerator; | |
| 20 | + | |
| 21 | +namespace NCC.Extend | |
| 22 | +{ | |
| 23 | + /// <summary> | |
| 24 | + /// 库存使用记录服务 | |
| 25 | + /// </summary> | |
| 26 | + [ApiDescriptionSettings(Tag = "绿纤库存使用记录管理", Name = "LqInventoryUsage", Order = 200)] | |
| 27 | + [Route("api/Extend/LqInventoryUsage")] | |
| 28 | + public class LqInventoryUsageService : IDynamicApiController, ITransient, ILqInventoryUsageService | |
| 29 | + { | |
| 30 | + private readonly IUserManager _userManager; | |
| 31 | + private readonly ILogger<LqInventoryUsageService> _logger; | |
| 32 | + private readonly ISqlSugarClient _db; | |
| 33 | + | |
| 34 | + /// <summary> | |
| 35 | + /// 构造函数 | |
| 36 | + /// </summary> | |
| 37 | + /// <param name="userManager">用户管理器</param> | |
| 38 | + /// <param name="logger">日志记录器</param> | |
| 39 | + /// <param name="db">数据库客户端</param> | |
| 40 | + public LqInventoryUsageService(IUserManager userManager, ILogger<LqInventoryUsageService> logger, ISqlSugarClient db) | |
| 41 | + { | |
| 42 | + _userManager = userManager; | |
| 43 | + _logger = logger; | |
| 44 | + _db = db; | |
| 45 | + } | |
| 46 | + | |
| 47 | + #region 添加库存使用记录 | |
| 48 | + /// <summary> | |
| 49 | + /// 添加库存使用记录 | |
| 50 | + /// </summary> | |
| 51 | + /// <param name="input">创建输入</param> | |
| 52 | + /// <returns>创建结果</returns> | |
| 53 | + [HttpPost("Create")] | |
| 54 | + public async Task CreateAsync([FromBody] LqInventoryUsageCrInput input) | |
| 55 | + { | |
| 56 | + try | |
| 57 | + { | |
| 58 | + // 验证产品是否存在 | |
| 59 | + var product = await _db.Queryable<LqInventoryEntity>().Where(x => x.Id == input.ProductId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync(); | |
| 60 | + | |
| 61 | + if (product == null) | |
| 62 | + { | |
| 63 | + throw NCCException.Oh("产品不存在或已失效"); | |
| 64 | + } | |
| 65 | + | |
| 66 | + // 检查库存数量是否足够 | |
| 67 | + if (product.Quantity < input.UsageQuantity) | |
| 68 | + { | |
| 69 | + throw NCCException.Oh($"库存不足,当前库存:{product.Quantity},需要数量:{input.UsageQuantity}"); | |
| 70 | + } | |
| 71 | + | |
| 72 | + _db.Ado.BeginTran(); | |
| 73 | + | |
| 74 | + // 创建使用记录 | |
| 75 | + var usageEntity = new LqInventoryUsageEntity | |
| 76 | + { | |
| 77 | + Id = YitIdHelper.NextId().ToString(), | |
| 78 | + ProductId = input.ProductId, | |
| 79 | + StoreId = input.StoreId, | |
| 80 | + UsageTime = input.UsageTime, | |
| 81 | + UsageQuantity = input.UsageQuantity, | |
| 82 | + RelatedConsumeId = input.RelatedConsumeId, | |
| 83 | + CreateUser = _userManager.UserId, | |
| 84 | + CreateTime = DateTime.Now, | |
| 85 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 86 | + }; | |
| 87 | + | |
| 88 | + var isOk = await _db.Insertable(usageEntity).ExecuteCommandAsync(); | |
| 89 | + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 90 | + | |
| 91 | + // 更新库存数量 | |
| 92 | + product.Quantity -= input.UsageQuantity; | |
| 93 | + product.UpdateUser = _userManager.UserId; | |
| 94 | + product.UpdateTime = DateTime.Now; | |
| 95 | + var updateOk = await _db.Updateable(product).ExecuteCommandAsync(); | |
| 96 | + if (!(updateOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); | |
| 97 | + _db.Ado.CommitTran(); | |
| 98 | + } | |
| 99 | + catch (Exception ex) | |
| 100 | + { | |
| 101 | + _db.Ado.RollbackTran(); | |
| 102 | + _logger.LogError(ex, "添加库存使用记录失败"); | |
| 103 | + throw NCCException.Oh($"添加失败:{ex.Message}"); | |
| 104 | + } | |
| 105 | + } | |
| 106 | + #endregion | |
| 107 | + | |
| 108 | + #region 作废库存使用记录 | |
| 109 | + /// <summary> | |
| 110 | + /// 作废库存使用记录 | |
| 111 | + /// </summary> | |
| 112 | + /// <param name="id">使用记录ID</param> | |
| 113 | + /// <param name="remarks">作废备注</param> | |
| 114 | + /// <returns>作废结果</returns> | |
| 115 | + [HttpPut("Cancel")] | |
| 116 | + public async Task CancelAsync([FromQuery] string id, [FromQuery] string remarks = null) | |
| 117 | + { | |
| 118 | + try | |
| 119 | + { | |
| 120 | + if (string.IsNullOrWhiteSpace(id)) | |
| 121 | + { | |
| 122 | + throw NCCException.Oh("使用记录ID不能为空"); | |
| 123 | + } | |
| 124 | + | |
| 125 | + // 检查使用记录是否存在 | |
| 126 | + var usageRecord = await _db.Queryable<LqInventoryUsageEntity>().Where(x => x.Id == id && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync(); | |
| 127 | + | |
| 128 | + if (usageRecord == null) | |
| 129 | + { | |
| 130 | + throw NCCException.Oh("使用记录不存在或已失效"); | |
| 131 | + } | |
| 132 | + | |
| 133 | + _db.Ado.BeginTran(); | |
| 134 | + | |
| 135 | + // 作废使用记录 | |
| 136 | + usageRecord.IsEffective = StatusEnum.无效.GetHashCode(); | |
| 137 | + usageRecord.UpdateUser = _userManager.UserId; | |
| 138 | + usageRecord.UpdateTime = DateTime.Now; | |
| 139 | + | |
| 140 | + var isOk = await _db.Updateable(usageRecord).ExecuteCommandAsync(); | |
| 141 | + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1003); | |
| 142 | + // 恢复库存数量 | |
| 143 | + var product = await _db.Queryable<LqInventoryEntity>().Where(x => x.Id == usageRecord.ProductId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync(); | |
| 144 | + if (product != null) | |
| 145 | + { | |
| 146 | + product.Quantity += usageRecord.UsageQuantity; | |
| 147 | + product.UpdateUser = _userManager.UserId; | |
| 148 | + product.UpdateTime = DateTime.Now; | |
| 149 | + var updateOk = await _db.Updateable(product).ExecuteCommandAsync(); | |
| 150 | + if (!(updateOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); | |
| 151 | + } | |
| 152 | + | |
| 153 | + _db.Ado.CommitTran(); | |
| 154 | + } | |
| 155 | + catch (Exception ex) | |
| 156 | + { | |
| 157 | + _db.Ado.RollbackTran(); | |
| 158 | + _logger.LogError(ex, "作废库存使用记录失败"); | |
| 159 | + throw NCCException.Oh($"作废失败:{ex.Message}"); | |
| 160 | + } | |
| 161 | + } | |
| 162 | + #endregion | |
| 163 | + | |
| 164 | + #region 获取使用记录列表 | |
| 165 | + /// <summary> | |
| 166 | + /// 获取使用记录列表 | |
| 167 | + /// </summary> | |
| 168 | + /// <param name="input">查询输入</param> | |
| 169 | + /// <returns>使用记录列表</returns> | |
| 170 | + [HttpGet("GetList")] | |
| 171 | + public async Task<dynamic> GetListAsync([FromQuery] LqInventoryUsageListQueryInput input) | |
| 172 | + { | |
| 173 | + try | |
| 174 | + { | |
| 175 | + var sidx = input.sidx == null ? "id" : input.sidx; | |
| 176 | + | |
| 177 | + // 查询使用记录信息 | |
| 178 | + var data = await _db.Queryable<LqInventoryUsageEntity>() | |
| 179 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), x => x.ProductId == input.ProductId) | |
| 180 | + .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), x => x.StoreId == input.StoreId) | |
| 181 | + .WhereIF(input.UsageStartTime.HasValue, x => x.UsageTime >= input.UsageStartTime.Value) | |
| 182 | + .WhereIF(input.UsageEndTime.HasValue, x => x.UsageTime <= input.UsageEndTime.Value) | |
| 183 | + .WhereIF(!string.IsNullOrWhiteSpace(input.RelatedConsumeId), x => x.RelatedConsumeId == input.RelatedConsumeId) | |
| 184 | + .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value) | |
| 185 | + .Select(x => new LqInventoryUsageListOutput | |
| 186 | + { | |
| 187 | + Id = x.Id, | |
| 188 | + ProductId = x.ProductId, | |
| 189 | + ProductName = SqlFunc.Subqueryable<LqInventoryEntity>().Where(p => p.Id == x.ProductId).Select(p => p.ProductName), | |
| 190 | + ProductCategory = SqlFunc.Subqueryable<LqInventoryEntity>().Where(p => p.Id == x.ProductId).Select(p => p.ProductCategory), | |
| 191 | + ProductPrice = SqlFunc.Subqueryable<LqInventoryEntity>().Where(p => p.Id == x.ProductId).Select(p => p.Price), | |
| 192 | + StoreId = x.StoreId, | |
| 193 | + StoreName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.StoreId).Select(u => u.RealName), | |
| 194 | + UsageTime = x.UsageTime, | |
| 195 | + UsageQuantity = x.UsageQuantity, | |
| 196 | + RelatedConsumeId = x.RelatedConsumeId, | |
| 197 | + CreateUser = x.CreateUser, | |
| 198 | + CreateUserName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.CreateUser).Select(u => u.RealName), | |
| 199 | + CreateTime = x.CreateTime, | |
| 200 | + UpdateUser = x.UpdateUser, | |
| 201 | + UpdateUserName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.UpdateUser).Select(u => u.RealName), | |
| 202 | + UpdateTime = x.UpdateTime, | |
| 203 | + IsEffective = x.IsEffective | |
| 204 | + }) | |
| 205 | + .MergeTable() | |
| 206 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductName), x => x.ProductName.Contains(input.ProductName)) | |
| 207 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), x => x.ProductCategory.Contains(input.ProductCategory)) | |
| 208 | + .WhereIF(!string.IsNullOrWhiteSpace(input.StoreName), x => x.StoreName.Contains(input.StoreName)) | |
| 209 | + .OrderBy(sidx + " " + input.sort) | |
| 210 | + .ToPagedListAsync(input.currentPage, input.pageSize); | |
| 211 | + return PageResult<LqInventoryUsageListOutput>.SqlSugarPageResult(data); | |
| 212 | + } | |
| 213 | + catch (Exception ex) | |
| 214 | + { | |
| 215 | + _logger.LogError(ex, "获取使用记录列表失败"); | |
| 216 | + throw NCCException.Oh($"获取使用记录列表失败:{ex.Message}"); | |
| 217 | + } | |
| 218 | + } | |
| 219 | + #endregion | |
| 220 | + | |
| 221 | + #region 统计时间周期内每个产品的使用数量 | |
| 222 | + /// <summary> | |
| 223 | + /// 统计时间周期内每个产品的使用数量 | |
| 224 | + /// </summary> | |
| 225 | + /// <param name="input">统计查询输入</param> | |
| 226 | + /// <returns>产品使用统计</returns> | |
| 227 | + [HttpPost("GetProductUsageStatistics")] | |
| 228 | + public async Task<dynamic> GetProductUsageStatisticsAsync([FromBody] LqInventoryUsageStatisticsInput input) | |
| 229 | + { | |
| 230 | + try | |
| 231 | + { | |
| 232 | + var data = await _db.Queryable<LqInventoryUsageEntity>() | |
| 233 | + .LeftJoin<LqInventoryEntity>((usage, product) => usage.ProductId == product.Id) | |
| 234 | + .Where((usage, product) => usage.UsageTime >= input.StartTime && usage.UsageTime <= input.EndTime) | |
| 235 | + .Where((usage, product) => usage.IsEffective == StatusEnum.有效.GetHashCode()) | |
| 236 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), (usage, product) => usage.ProductId == input.ProductId) | |
| 237 | + .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), (usage, product) => usage.StoreId == input.StoreId) | |
| 238 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), (usage, product) => product.ProductCategory == input.ProductCategory) | |
| 239 | + .GroupBy((usage, product) => new { usage.ProductId, product.ProductName, product.ProductCategory, product.Price }) | |
| 240 | + .Select((usage, product) => new ProductUsageStatisticsOutput | |
| 241 | + { | |
| 242 | + ProductId = usage.ProductId, | |
| 243 | + ProductName = product.ProductName, | |
| 244 | + ProductCategory = product.ProductCategory, | |
| 245 | + ProductPrice = product.Price, | |
| 246 | + TotalUsageQuantity = SqlFunc.AggregateSum(usage.UsageQuantity), | |
| 247 | + TotalUsageAmount = SqlFunc.AggregateSum(usage.UsageQuantity * product.Price), | |
| 248 | + UsageCount = SqlFunc.AggregateCount(usage.Id), | |
| 249 | + AverageUsageQuantity = SqlFunc.AggregateAvg(usage.UsageQuantity) | |
| 250 | + }) | |
| 251 | + .ToListAsync(); | |
| 252 | + | |
| 253 | + return new | |
| 254 | + { | |
| 255 | + success = true, | |
| 256 | + data = data, | |
| 257 | + total = data.Count, | |
| 258 | + message = "产品使用统计查询成功" | |
| 259 | + }; | |
| 260 | + } | |
| 261 | + catch (Exception ex) | |
| 262 | + { | |
| 263 | + _logger.LogError(ex, "获取产品使用统计失败"); | |
| 264 | + throw NCCException.Oh($"获取产品使用统计失败:{ex.Message}"); | |
| 265 | + } | |
| 266 | + } | |
| 267 | + #endregion | |
| 268 | + | |
| 269 | + #region 统计时间周期内每个门店的使用情况 | |
| 270 | + /// <summary> | |
| 271 | + /// 统计时间周期内每个门店的使用情况 | |
| 272 | + /// </summary> | |
| 273 | + /// <param name="input">统计查询输入</param> | |
| 274 | + /// <returns>门店使用统计</returns> | |
| 275 | + [HttpPost("GetStoreUsageStatistics")] | |
| 276 | + public async Task<dynamic> GetStoreUsageStatisticsAsync([FromBody] LqInventoryUsageStatisticsInput input) | |
| 277 | + { | |
| 278 | + try | |
| 279 | + { | |
| 280 | + var data = await _db.Queryable<LqInventoryUsageEntity>() | |
| 281 | + .LeftJoin<LqInventoryEntity>((usage, product) => usage.ProductId == product.Id) | |
| 282 | + .LeftJoin<UserEntity>((usage, product, store) => usage.StoreId == store.Id) | |
| 283 | + .Where((usage, product, store) => usage.UsageTime >= input.StartTime && usage.UsageTime <= input.EndTime) | |
| 284 | + .Where((usage, product, store) => usage.IsEffective == StatusEnum.有效.GetHashCode()) | |
| 285 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), (usage, product, store) => usage.ProductId == input.ProductId) | |
| 286 | + .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), (usage, product, store) => usage.StoreId == input.StoreId) | |
| 287 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), (usage, product, store) => product.ProductCategory == input.ProductCategory) | |
| 288 | + .GroupBy((usage, product, store) => new { usage.StoreId, store.RealName }) | |
| 289 | + .Select((usage, product, store) => new StoreUsageStatisticsOutput | |
| 290 | + { | |
| 291 | + StoreId = usage.StoreId, | |
| 292 | + StoreName = store.RealName, | |
| 293 | + TotalUsageQuantity = SqlFunc.AggregateSum(usage.UsageQuantity), | |
| 294 | + TotalUsageAmount = SqlFunc.AggregateSum(usage.UsageQuantity * product.Price), | |
| 295 | + UsageCount = SqlFunc.AggregateCount(usage.Id), | |
| 296 | + ProductVarietyCount = SqlFunc.AggregateCount(usage.ProductId) | |
| 297 | + }) | |
| 298 | + .ToListAsync(); | |
| 299 | + | |
| 300 | + return new | |
| 301 | + { | |
| 302 | + success = true, | |
| 303 | + data = data, | |
| 304 | + total = data.Count, | |
| 305 | + message = "门店使用统计查询成功" | |
| 306 | + }; | |
| 307 | + } | |
| 308 | + catch (Exception ex) | |
| 309 | + { | |
| 310 | + _logger.LogError(ex, "获取门店使用统计失败"); | |
| 311 | + throw NCCException.Oh($"获取门店使用统计失败:{ex.Message}"); | |
| 312 | + } | |
| 313 | + } | |
| 314 | + #endregion | |
| 315 | + | |
| 316 | + #region 统计时间周期内使用趋势 | |
| 317 | + /// <summary> | |
| 318 | + /// 统计时间周期内使用趋势 | |
| 319 | + /// </summary> | |
| 320 | + /// <param name="input">统计查询输入</param> | |
| 321 | + /// <returns>使用趋势统计</returns> | |
| 322 | + [HttpPost("GetUsageTrendStatistics")] | |
| 323 | + public async Task<dynamic> GetUsageTrendStatisticsAsync([FromBody] LqInventoryUsageStatisticsInput input) | |
| 324 | + { | |
| 325 | + try | |
| 326 | + { | |
| 327 | + // 先获取基础数据 | |
| 328 | + var baseData = await _db.Queryable<LqInventoryUsageEntity>() | |
| 329 | + .LeftJoin<LqInventoryEntity>((usage, product) => usage.ProductId == product.Id) | |
| 330 | + .Where((usage, product) => usage.UsageTime >= input.StartTime && usage.UsageTime <= input.EndTime) | |
| 331 | + .Where((usage, product) => usage.IsEffective == StatusEnum.有效.GetHashCode()) | |
| 332 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), (usage, product) => usage.ProductId == input.ProductId) | |
| 333 | + .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), (usage, product) => usage.StoreId == input.StoreId) | |
| 334 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), (usage, product) => product.ProductCategory == input.ProductCategory) | |
| 335 | + .Select((usage, product) => new | |
| 336 | + { | |
| 337 | + UsageTime = usage.UsageTime, | |
| 338 | + UsageQuantity = usage.UsageQuantity, | |
| 339 | + UsageAmount = usage.UsageQuantity * product.Price, | |
| 340 | + ProductId = usage.ProductId | |
| 341 | + }) | |
| 342 | + .ToListAsync(); | |
| 343 | + | |
| 344 | + // 根据统计类型分组 | |
| 345 | + var groupedData = input.StatisticsType switch | |
| 346 | + { | |
| 347 | + "日" => baseData.GroupBy(x => x.UsageTime.Date) | |
| 348 | + .Select(g => new UsageTrendStatisticsOutput | |
| 349 | + { | |
| 350 | + StatisticsDate = g.Key, | |
| 351 | + TotalUsageQuantity = g.Sum(x => x.UsageQuantity), | |
| 352 | + TotalUsageAmount = g.Sum(x => x.UsageAmount), | |
| 353 | + UsageCount = g.Count(), | |
| 354 | + ProductVarietyCount = g.Select(x => x.ProductId).Distinct().Count() | |
| 355 | + }) | |
| 356 | + .OrderBy(x => x.StatisticsDate) | |
| 357 | + .ToList(), | |
| 358 | + "月" => baseData.GroupBy(x => new { x.UsageTime.Year, x.UsageTime.Month }) | |
| 359 | + .Select(g => new UsageTrendStatisticsOutput | |
| 360 | + { | |
| 361 | + StatisticsDate = new DateTime(g.Key.Year, g.Key.Month, 1), | |
| 362 | + TotalUsageQuantity = g.Sum(x => x.UsageQuantity), | |
| 363 | + TotalUsageAmount = g.Sum(x => x.UsageAmount), | |
| 364 | + UsageCount = g.Count(), | |
| 365 | + ProductVarietyCount = g.Select(x => x.ProductId).Distinct().Count() | |
| 366 | + }) | |
| 367 | + .OrderBy(x => x.StatisticsDate) | |
| 368 | + .ToList(), | |
| 369 | + _ => baseData.GroupBy(x => x.UsageTime.Date) | |
| 370 | + .Select(g => new UsageTrendStatisticsOutput | |
| 371 | + { | |
| 372 | + StatisticsDate = g.Key, | |
| 373 | + TotalUsageQuantity = g.Sum(x => x.UsageQuantity), | |
| 374 | + TotalUsageAmount = g.Sum(x => x.UsageAmount), | |
| 375 | + UsageCount = g.Count(), | |
| 376 | + ProductVarietyCount = g.Select(x => x.ProductId).Distinct().Count() | |
| 377 | + }) | |
| 378 | + .OrderBy(x => x.StatisticsDate) | |
| 379 | + .ToList() | |
| 380 | + }; | |
| 381 | + | |
| 382 | + return new | |
| 383 | + { | |
| 384 | + success = true, | |
| 385 | + data = groupedData, | |
| 386 | + total = groupedData.Count, | |
| 387 | + message = "使用趋势统计查询成功" | |
| 388 | + }; | |
| 389 | + } | |
| 390 | + catch (Exception ex) | |
| 391 | + { | |
| 392 | + _logger.LogError(ex, "获取使用趋势统计失败"); | |
| 393 | + throw NCCException.Oh($"获取使用趋势统计失败:{ex.Message}"); | |
| 394 | + } | |
| 395 | + } | |
| 396 | + #endregion | |
| 397 | + | |
| 398 | + #region 统计产品使用排行榜 | |
| 399 | + /// <summary> | |
| 400 | + /// 统计产品使用排行榜 | |
| 401 | + /// </summary> | |
| 402 | + /// <param name="input">统计查询输入</param> | |
| 403 | + /// <returns>产品使用排行榜</returns> | |
| 404 | + [HttpPost("GetProductUsageRanking")] | |
| 405 | + public async Task<dynamic> GetProductUsageRankingAsync([FromBody] LqInventoryUsageStatisticsInput input) | |
| 406 | + { | |
| 407 | + try | |
| 408 | + { | |
| 409 | + var data = await _db.Queryable<LqInventoryUsageEntity>() | |
| 410 | + .LeftJoin<LqInventoryEntity>((usage, product) => usage.ProductId == product.Id) | |
| 411 | + .Where((usage, product) => usage.UsageTime >= input.StartTime && usage.UsageTime <= input.EndTime) | |
| 412 | + .Where((usage, product) => usage.IsEffective == StatusEnum.有效.GetHashCode()) | |
| 413 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductId), (usage, product) => usage.ProductId == input.ProductId) | |
| 414 | + .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), (usage, product) => usage.StoreId == input.StoreId) | |
| 415 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductCategory), (usage, product) => product.ProductCategory == input.ProductCategory) | |
| 416 | + .GroupBy((usage, product) => new { usage.ProductId, product.ProductName, product.ProductCategory }) | |
| 417 | + .Select((usage, product) => new ProductUsageRankingOutput | |
| 418 | + { | |
| 419 | + ProductId = usage.ProductId, | |
| 420 | + ProductName = product.ProductName, | |
| 421 | + ProductCategory = product.ProductCategory, | |
| 422 | + TotalUsageQuantity = SqlFunc.AggregateSum(usage.UsageQuantity), | |
| 423 | + TotalUsageAmount = SqlFunc.AggregateSum(usage.UsageQuantity * product.Price), | |
| 424 | + UsageCount = SqlFunc.AggregateCount(usage.Id), | |
| 425 | + StoreCount = SqlFunc.AggregateCount(usage.StoreId) | |
| 426 | + }) | |
| 427 | + .OrderBy("TotalUsageQuantity desc") | |
| 428 | + .Take(input.RankingCount) | |
| 429 | + .ToListAsync(); | |
| 430 | + | |
| 431 | + // 添加排名 | |
| 432 | + for (int i = 0; i < data.Count; i++) | |
| 433 | + { | |
| 434 | + data[i].Ranking = i + 1; | |
| 435 | + } | |
| 436 | + | |
| 437 | + return new | |
| 438 | + { | |
| 439 | + success = true, | |
| 440 | + data = data, | |
| 441 | + total = data.Count, | |
| 442 | + message = "产品使用排行榜查询成功" | |
| 443 | + }; | |
| 444 | + } | |
| 445 | + catch (Exception ex) | |
| 446 | + { | |
| 447 | + _logger.LogError(ex, "获取产品使用排行榜失败"); | |
| 448 | + throw NCCException.Oh($"获取产品使用排行榜失败:{ex.Message}"); | |
| 449 | + } | |
| 450 | + } | |
| 451 | + #endregion | |
| 452 | + | |
| 453 | + | |
| 454 | + } | |
| 455 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
| ... | ... | @@ -5,6 +5,7 @@ using System.Net.Http; |
| 5 | 5 | using System.Threading.Tasks; |
| 6 | 6 | using Mapster; |
| 7 | 7 | using Microsoft.AspNetCore.Mvc; |
| 8 | +using Microsoft.Extensions.Logging; | |
| 8 | 9 | using NCC.ClayObject; |
| 9 | 10 | using NCC.Common.Configuration; |
| 10 | 11 | using NCC.Common.Core.Manager; |
| ... | ... | @@ -22,6 +23,8 @@ using NCC.Extend.Entitys.Dto.LqKdKdjlb; |
| 22 | 23 | using NCC.Extend.Entitys.Enum; |
| 23 | 24 | using NCC.Extend.Entitys.lq_hytk_hytk; |
| 24 | 25 | using NCC.Extend.Entitys.lq_hytk_mx; |
| 26 | +using NCC.Extend.Entitys.lq_hytk_jksyj; | |
| 27 | +using NCC.Extend.Entitys.lq_hytk_kjbsyj; | |
| 25 | 28 | using NCC.Extend.Entitys.lq_jinsanjiao_user; |
| 26 | 29 | using NCC.Extend.Entitys.lq_kd_deductinfo; |
| 27 | 30 | using NCC.Extend.Entitys.lq_xh_hyhk; |
| ... | ... | @@ -58,6 +61,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 58 | 61 | private readonly IUserManager _userManager; |
| 59 | 62 | private readonly WeChatBotService _weChatBotService; |
| 60 | 63 | private readonly LqKdKdjlbStringGenerator _stringGenerator; |
| 64 | + private readonly ILogger<LqKdKdjlbService> _logger; | |
| 61 | 65 | |
| 62 | 66 | /// <summary> |
| 63 | 67 | /// 初始化一个<see cref="LqKdKdjlbService"/>类型的新实例 |
| ... | ... | @@ -69,7 +73,8 @@ namespace NCC.Extend.LqKdKdjlb |
| 69 | 73 | ISqlSugarRepository<LqKdPxmxEntity> lqKdPxmxRepository, |
| 70 | 74 | IUserManager userManager, |
| 71 | 75 | WeChatBotService weChatBotService, |
| 72 | - LqKdKdjlbStringGenerator stringGenerator | |
| 76 | + LqKdKdjlbStringGenerator stringGenerator, | |
| 77 | + ILogger<LqKdKdjlbService> logger | |
| 73 | 78 | ) |
| 74 | 79 | { |
| 75 | 80 | _lqKdKdjlbRepository = lqKdKdjlbRepository; |
| ... | ... | @@ -80,6 +85,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 80 | 85 | _userManager = userManager; |
| 81 | 86 | _weChatBotService = weChatBotService; |
| 82 | 87 | _stringGenerator = stringGenerator; |
| 88 | + _logger = logger; | |
| 83 | 89 | } |
| 84 | 90 | |
| 85 | 91 | #region 获取开单记录表 |
| ... | ... | @@ -2310,6 +2316,389 @@ namespace NCC.Extend.LqKdKdjlb |
| 2310 | 2316 | } |
| 2311 | 2317 | #endregion |
| 2312 | 2318 | |
| 2319 | + #region 会员转卡操作 | |
| 2320 | + /// <summary> | |
| 2321 | + /// 会员转卡操作 | |
| 2322 | + /// </summary> | |
| 2323 | + /// <remarks> | |
| 2324 | + /// 转卡是指一个会员把自己剩余的某些品项,转给另外一个会员 | |
| 2325 | + /// 转卡会员转出的品项,就做退卡操作 | |
| 2326 | + /// 被转卡会员收到的品项,做开卡操作 | |
| 2327 | + /// | |
| 2328 | + /// 示例请求: | |
| 2329 | + /// ```json | |
| 2330 | + /// { | |
| 2331 | + /// "fromMemberId": "member001", | |
| 2332 | + /// "toMemberId": "member002", | |
| 2333 | + /// "storeId": "store001", | |
| 2334 | + /// "signatureFile": "签名文件路径", | |
| 2335 | + /// "remarks": "转卡备注", | |
| 2336 | + /// "transferItems": [ | |
| 2337 | + /// { | |
| 2338 | + /// "billingItemId": "item001", | |
| 2339 | + /// "transferQuantity": 5, | |
| 2340 | + /// "itemId": "px001", | |
| 2341 | + /// "itemName": "美容项目", | |
| 2342 | + /// "itemPrice": 100.00, | |
| 2343 | + /// "sourceType": "转卡", | |
| 2344 | + /// "healthTeacherPerformances": [ | |
| 2345 | + /// { | |
| 2346 | + /// "healthTeacherId": "jks001", | |
| 2347 | + /// "healthTeacherName": "张医生", | |
| 2348 | + /// "healthTeacherAccount": "zhang001", | |
| 2349 | + /// "performanceAmount": 50.00, | |
| 2350 | + /// "laborCost": 20.00, | |
| 2351 | + /// "itemQuantity": 5 | |
| 2352 | + /// } | |
| 2353 | + /// ], | |
| 2354 | + /// "techTeacherPerformances": [ | |
| 2355 | + /// { | |
| 2356 | + /// "techTeacherId": "kjbs001", | |
| 2357 | + /// "techTeacherName": "李老师", | |
| 2358 | + /// "techTeacherAccount": "li001", | |
| 2359 | + /// "performanceAmount": 30.00, | |
| 2360 | + /// "laborCost": 10.00, | |
| 2361 | + /// "itemQuantity": 5 | |
| 2362 | + /// } | |
| 2363 | + /// ] | |
| 2364 | + /// } | |
| 2365 | + /// ] | |
| 2366 | + /// } | |
| 2367 | + /// ``` | |
| 2368 | + /// | |
| 2369 | + /// 参数说明: | |
| 2370 | + /// - fromMemberId: 转出会员ID | |
| 2371 | + /// - toMemberId: 转入会员ID | |
| 2372 | + /// - storeId: 门店ID | |
| 2373 | + /// - signatureFile: 转出会员签名 | |
| 2374 | + /// - remarks: 转卡备注 | |
| 2375 | + /// - transferItems: 转出品项列表 | |
| 2376 | + /// - billingItemId: 开单品项明细ID | |
| 2377 | + /// - transferQuantity: 转出数量 | |
| 2378 | + /// - itemId: 品项ID | |
| 2379 | + /// - itemName: 品项名称 | |
| 2380 | + /// - itemPrice: 品项价格 | |
| 2381 | + /// - sourceType: 来源类型 | |
| 2382 | + /// - healthTeacherPerformances: 健康师业绩列表 | |
| 2383 | + /// - healthTeacherId: 健康师ID | |
| 2384 | + /// - healthTeacherName: 健康师姓名 | |
| 2385 | + /// - healthTeacherAccount: 健康师账号 | |
| 2386 | + /// - performanceAmount: 业绩金额 | |
| 2387 | + /// - laborCost: 人工成本 | |
| 2388 | + /// - itemQuantity: 品项数量 | |
| 2389 | + /// - techTeacherPerformances: 科技部老师业绩列表 | |
| 2390 | + /// - techTeacherId: 科技部老师ID | |
| 2391 | + /// - techTeacherName: 科技部老师姓名 | |
| 2392 | + /// - techTeacherAccount: 科技部老师账号 | |
| 2393 | + /// - performanceAmount: 业绩金额 | |
| 2394 | + /// - laborCost: 人工成本 | |
| 2395 | + /// - itemQuantity: 品项数量 | |
| 2396 | + /// </remarks> | |
| 2397 | + /// <param name="input">转卡输入参数</param> | |
| 2398 | + /// <returns>转卡结果</returns> | |
| 2399 | + /// <response code="200">转卡成功</response> | |
| 2400 | + /// <response code="400">参数错误或业务规则验证失败</response> | |
| 2401 | + /// <response code="500">服务器错误</response> | |
| 2402 | + [HttpPost("TransferCard")] | |
| 2403 | + public async Task<TransferCardOutput> TransferCard([FromBody] TransferCardInput input) | |
| 2404 | + { | |
| 2405 | + if (input == null) | |
| 2406 | + { | |
| 2407 | + throw NCCException.Oh("转卡参数不能为空"); | |
| 2408 | + } | |
| 2409 | + | |
| 2410 | + var userInfo = await _userManager.GetUserInfo(); | |
| 2411 | + var transferTime = DateTime.Now; | |
| 2412 | + | |
| 2413 | + try | |
| 2414 | + { | |
| 2415 | + // 开启事务 | |
| 2416 | + _db.BeginTran(); | |
| 2417 | + | |
| 2418 | + // 1. 验证转出和转入会员是否存在 | |
| 2419 | + var fromMember = await _db.Queryable<LqKhxxEntity>().Where(x => x.Id == input.FromMemberId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync(); | |
| 2420 | + if (fromMember == null) | |
| 2421 | + { | |
| 2422 | + throw NCCException.Oh("转出会员不存在或已失效"); | |
| 2423 | + } | |
| 2424 | + var toMember = await _db.Queryable<LqKhxxEntity>().Where(x => x.Id == input.ToMemberId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync(); | |
| 2425 | + if (toMember == null) | |
| 2426 | + { | |
| 2427 | + throw NCCException.Oh("转入会员不存在或已失效"); | |
| 2428 | + } | |
| 2429 | + | |
| 2430 | + // 2. 验证转出品项的余额是否足够 | |
| 2431 | + foreach (var item in input.TransferItems) | |
| 2432 | + { | |
| 2433 | + var billingItem = await _db.Queryable<LqKdPxmxEntity>().Where(x => x.Id == item.BillingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).FirstAsync(); | |
| 2434 | + if (billingItem == null) | |
| 2435 | + { | |
| 2436 | + throw NCCException.Oh($"品项明细不存在:{item.ItemName}"); | |
| 2437 | + } | |
| 2438 | + | |
| 2439 | + // 查询剩余数量 | |
| 2440 | + var remainingCount = await GetItemRemainingCount(item.BillingItemId); | |
| 2441 | + if (remainingCount < item.TransferQuantity) | |
| 2442 | + { | |
| 2443 | + throw NCCException.Oh($"品项 {item.ItemName} 剩余数量不足,当前剩余:{remainingCount},需要转出:{item.TransferQuantity}"); | |
| 2444 | + } | |
| 2445 | + } | |
| 2446 | + | |
| 2447 | + // 3. 创建退卡记录(转出方) | |
| 2448 | + var refundId = YitIdHelper.NextId().ToString(); | |
| 2449 | + var refundEntity = new LqHytkHytkEntity | |
| 2450 | + { | |
| 2451 | + Id = refundId, | |
| 2452 | + F_CreateTime = transferTime, | |
| 2453 | + F_CreateUser = userInfo.userId, | |
| 2454 | + IsEffective = StatusEnum.有效.GetHashCode(), | |
| 2455 | + Czry = userInfo.userId, | |
| 2456 | + Hy = input.FromMemberId, | |
| 2457 | + Hymc = fromMember.Khmc, | |
| 2458 | + Md = input.StoreId, | |
| 2459 | + SignatureFile = input.SignatureFile, | |
| 2460 | + Tkje = input.TransferItems.Sum(x => x.ItemPrice * x.TransferQuantity), | |
| 2461 | + Tkyy = "转卡", | |
| 2462 | + Bz = $"转卡给会员:{toMember.Khmc},{input.Remarks}" | |
| 2463 | + }; | |
| 2464 | + await _db.Insertable(refundEntity).ExecuteCommandAsync(); | |
| 2465 | + | |
| 2466 | + // 4. 创建退卡品项明细和业绩记录 | |
| 2467 | + var refundMxEntities = new List<LqHytkMxEntity>(); | |
| 2468 | + var refundJksyjEntities = new List<LqHytkJksyjEntity>(); | |
| 2469 | + var refundKjbsyjEntities = new List<LqHytkKjbsyjEntity>(); | |
| 2470 | + | |
| 2471 | + foreach (var item in input.TransferItems) | |
| 2472 | + { | |
| 2473 | + var refundMxEntity = new LqHytkMxEntity | |
| 2474 | + { | |
| 2475 | + Id = YitIdHelper.NextId().ToString(), | |
| 2476 | + RefundInfoId = refundId, | |
| 2477 | + BillingItemId = item.BillingItemId, | |
| 2478 | + CreateTime = transferTime, | |
| 2479 | + CreateUser = userInfo.userId, | |
| 2480 | + Px = item.ItemId, | |
| 2481 | + Pxmc = item.ItemName, | |
| 2482 | + Pxjg = item.ItemPrice, | |
| 2483 | + Tkje = item.ItemPrice * item.TransferQuantity, | |
| 2484 | + ProjectNumber = item.TransferQuantity, | |
| 2485 | + SourceType = item.SourceType, | |
| 2486 | + TotalPrice = item.ItemPrice * item.TransferQuantity, | |
| 2487 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 2488 | + }; | |
| 2489 | + refundMxEntities.Add(refundMxEntity); | |
| 2490 | + | |
| 2491 | + // 创建退卡健康师业绩记录 | |
| 2492 | + if (item.HealthTeacherPerformances != null && item.HealthTeacherPerformances.Any()) | |
| 2493 | + { | |
| 2494 | + foreach (var jks in item.HealthTeacherPerformances) | |
| 2495 | + { | |
| 2496 | + refundJksyjEntities.Add(new LqHytkJksyjEntity | |
| 2497 | + { | |
| 2498 | + Id = YitIdHelper.NextId().ToString(), | |
| 2499 | + Gltkbh = refundId, | |
| 2500 | + Jks = jks.HealthTeacherId, | |
| 2501 | + Jksxm = jks.HealthTeacherName, | |
| 2502 | + Jkszh = jks.HealthTeacherAccount, | |
| 2503 | + Jksyj = jks.PerformanceAmount, | |
| 2504 | + Tksj = transferTime, | |
| 2505 | + F_jsjid = jks.HealthTeacherId, | |
| 2506 | + F_tkpxid = refundMxEntity.Id, | |
| 2507 | + F_LaborCost = jks.LaborCost, | |
| 2508 | + F_tkpxNumber = jks.ItemQuantity, | |
| 2509 | + F_CreateTime = transferTime, | |
| 2510 | + F_CreateUser = userInfo.userId, | |
| 2511 | + CardReturn = refundMxEntity.Id, | |
| 2512 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 2513 | + }); | |
| 2514 | + } | |
| 2515 | + } | |
| 2516 | + | |
| 2517 | + // 创建退卡科技部老师业绩记录 | |
| 2518 | + if (item.TechTeacherPerformances != null && item.TechTeacherPerformances.Any()) | |
| 2519 | + { | |
| 2520 | + foreach (var kjbs in item.TechTeacherPerformances) | |
| 2521 | + { | |
| 2522 | + refundKjbsyjEntities.Add(new LqHytkKjbsyjEntity | |
| 2523 | + { | |
| 2524 | + Id = YitIdHelper.NextId().ToString(), | |
| 2525 | + Gltkbh = refundId, | |
| 2526 | + Kjbls = kjbs.TechTeacherId, | |
| 2527 | + Kjblsxm = kjbs.TechTeacherName, | |
| 2528 | + Kjblszh = kjbs.TechTeacherAccount, | |
| 2529 | + Kjblsyj = kjbs.PerformanceAmount, | |
| 2530 | + Tksj = transferTime, | |
| 2531 | + F_tkpxid = refundMxEntity.Id, | |
| 2532 | + F_LaborCost = kjbs.LaborCost, | |
| 2533 | + F_tkpxNumber = kjbs.ItemQuantity, | |
| 2534 | + F_CreateTime = transferTime, | |
| 2535 | + F_CreateUser = userInfo.userId, | |
| 2536 | + CardReturn = refundMxEntity.Id, | |
| 2537 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 2538 | + }); | |
| 2539 | + } | |
| 2540 | + } | |
| 2541 | + } | |
| 2542 | + | |
| 2543 | + await _db.Insertable(refundMxEntities).ExecuteCommandAsync(); | |
| 2544 | + if (refundJksyjEntities.Any()) | |
| 2545 | + { | |
| 2546 | + await _db.Insertable(refundJksyjEntities).ExecuteCommandAsync(); | |
| 2547 | + } | |
| 2548 | + if (refundKjbsyjEntities.Any()) | |
| 2549 | + { | |
| 2550 | + await _db.Insertable(refundKjbsyjEntities).ExecuteCommandAsync(); | |
| 2551 | + } | |
| 2552 | + | |
| 2553 | + // 5. 创建开卡记录(转入方) | |
| 2554 | + var billingId = YitIdHelper.NextId().ToString(); | |
| 2555 | + var billingEntity = new LqKdKdjlbEntity | |
| 2556 | + { | |
| 2557 | + Id = billingId, | |
| 2558 | + CreateTime = transferTime, | |
| 2559 | + UpdateTime = transferTime, | |
| 2560 | + IsEffective = StatusEnum.有效.GetHashCode(), | |
| 2561 | + CreateUser = userInfo.userId, | |
| 2562 | + Kdhy = input.ToMemberId, | |
| 2563 | + Djmd = input.StoreId, | |
| 2564 | + Sfyj = input.TransferItems.Sum(x => x.ItemPrice * x.TransferQuantity), | |
| 2565 | + Bz = $"从会员 {fromMember.Khmc} 转入,{input.Remarks}" | |
| 2566 | + }; | |
| 2567 | + await _db.Insertable(billingEntity).ExecuteCommandAsync(); | |
| 2568 | + // 6. 创建开单品项明细和业绩记录 | |
| 2569 | + var billingPxmxEntities = new List<LqKdPxmxEntity>(); | |
| 2570 | + var billingJksyjEntities = new List<LqKdJksyjEntity>(); | |
| 2571 | + var billingKjbsyjEntities = new List<LqKdKjbsyjEntity>(); | |
| 2572 | + | |
| 2573 | + foreach (var item in input.TransferItems) | |
| 2574 | + { | |
| 2575 | + var billingPxmxEntity = new LqKdPxmxEntity | |
| 2576 | + { | |
| 2577 | + Id = YitIdHelper.NextId().ToString(), | |
| 2578 | + Glkdbh = billingId, | |
| 2579 | + Px = item.ItemId, | |
| 2580 | + Pxmc = item.ItemName, | |
| 2581 | + Pxjg = item.ItemPrice, | |
| 2582 | + MemberId = input.ToMemberId, | |
| 2583 | + CreateTIme = transferTime, | |
| 2584 | + ProjectNumber = item.TransferQuantity, | |
| 2585 | + IsEnabled = StatusEnum.有效.GetHashCode(), | |
| 2586 | + SourceType = item.SourceType, | |
| 2587 | + TotalPrice = item.ItemPrice * item.TransferQuantity, | |
| 2588 | + ActualPrice = item.ItemPrice * item.TransferQuantity, | |
| 2589 | + IsEffective = StatusEnum.有效.GetHashCode(), | |
| 2590 | + Remark = $"从会员 {fromMember.Khmc} 转入" | |
| 2591 | + }; | |
| 2592 | + billingPxmxEntities.Add(billingPxmxEntity); | |
| 2593 | + | |
| 2594 | + // 创建开卡健康师业绩记录 | |
| 2595 | + if (item.HealthTeacherPerformances != null && item.HealthTeacherPerformances.Any()) | |
| 2596 | + { | |
| 2597 | + foreach (var jks in item.HealthTeacherPerformances) | |
| 2598 | + { | |
| 2599 | + billingJksyjEntities.Add(new LqKdJksyjEntity | |
| 2600 | + { | |
| 2601 | + Id = YitIdHelper.NextId().ToString(), | |
| 2602 | + Glkdbh = billingId, | |
| 2603 | + Jks = jks.HealthTeacherId, | |
| 2604 | + Jksxm = jks.HealthTeacherName, | |
| 2605 | + Jkszh = jks.HealthTeacherAccount, | |
| 2606 | + Jksyj = jks.PerformanceAmount.ToString(), | |
| 2607 | + Yjsj = transferTime, | |
| 2608 | + Jsj_id = jks.HealthTeacherId, | |
| 2609 | + Kdpxid = billingPxmxEntity.Id, | |
| 2610 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 2611 | + }); | |
| 2612 | + } | |
| 2613 | + } | |
| 2614 | + | |
| 2615 | + // 创建开卡科技部老师业绩记录 | |
| 2616 | + if (item.TechTeacherPerformances != null && item.TechTeacherPerformances.Any()) | |
| 2617 | + { | |
| 2618 | + foreach (var kjbs in item.TechTeacherPerformances) | |
| 2619 | + { | |
| 2620 | + billingKjbsyjEntities.Add(new LqKdKjbsyjEntity | |
| 2621 | + { | |
| 2622 | + Id = YitIdHelper.NextId().ToString(), | |
| 2623 | + Glkdbh = billingId, | |
| 2624 | + Kjbls = kjbs.TechTeacherId, | |
| 2625 | + Kjblsxm = kjbs.TechTeacherName, | |
| 2626 | + Kjblszh = kjbs.TechTeacherAccount, | |
| 2627 | + Kjblsyj = kjbs.PerformanceAmount.ToString(), | |
| 2628 | + Yjsj = transferTime, | |
| 2629 | + Kdpxid = billingPxmxEntity.Id, | |
| 2630 | + LaborCost = kjbs.LaborCost, | |
| 2631 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 2632 | + }); | |
| 2633 | + } | |
| 2634 | + } | |
| 2635 | + } | |
| 2636 | + | |
| 2637 | + await _db.Insertable(billingPxmxEntities).ExecuteCommandAsync(); | |
| 2638 | + if (billingJksyjEntities.Any()) | |
| 2639 | + { | |
| 2640 | + await _db.Insertable(billingJksyjEntities).ExecuteCommandAsync(); | |
| 2641 | + } | |
| 2642 | + if (billingKjbsyjEntities.Any()) | |
| 2643 | + { | |
| 2644 | + await _db.Insertable(billingKjbsyjEntities).ExecuteCommandAsync(); | |
| 2645 | + } | |
| 2646 | + // 提交事务 | |
| 2647 | + _db.CommitTran(); | |
| 2648 | + | |
| 2649 | + return new TransferCardOutput | |
| 2650 | + { | |
| 2651 | + Success = true, | |
| 2652 | + TransferId = refundId, | |
| 2653 | + RefundId = refundId, | |
| 2654 | + BillingId = billingId, | |
| 2655 | + TotalAmount = input.TransferItems.Sum(x => x.ItemPrice * x.TransferQuantity), | |
| 2656 | + TotalQuantity = input.TransferItems.Sum(x => x.TransferQuantity), | |
| 2657 | + FromMemberName = fromMember.Khmc, | |
| 2658 | + ToMemberName = toMember.Khmc, | |
| 2659 | + TransferTime = transferTime, | |
| 2660 | + Message = "转卡操作成功" | |
| 2661 | + }; | |
| 2662 | + } | |
| 2663 | + catch (Exception ex) | |
| 2664 | + { | |
| 2665 | + _db.RollbackTran(); | |
| 2666 | + _logger.LogError(ex, "转卡操作失败:{Message}", ex.Message); | |
| 2667 | + throw NCCException.Oh($"转卡操作失败:{ex.Message}"); | |
| 2668 | + } | |
| 2669 | + } | |
| 2670 | + #endregion | |
| 2671 | + | |
| 2672 | + #region 获取品项剩余数量 | |
| 2673 | + /// <summary> | |
| 2674 | + /// 获取品项剩余数量 | |
| 2675 | + /// </summary> | |
| 2676 | + /// <param name="billingItemId">开单品项明细ID</param> | |
| 2677 | + /// <returns>剩余数量</returns> | |
| 2678 | + private async Task<int> GetItemRemainingCount(string billingItemId) | |
| 2679 | + { | |
| 2680 | + try | |
| 2681 | + { | |
| 2682 | + // 查询购买数量 | |
| 2683 | + var purchasedCount = await _db.Queryable<LqKdPxmxEntity>().Where(x => x.Id == billingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).Select(x => x.ProjectNumber).FirstAsync(); | |
| 2684 | + // 查询消费数量 | |
| 2685 | + var consumedCount = await _db.Queryable<LqXhPxmxEntity>().Where(x => x.BillingItemId == billingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).SumAsync(x => x.ProjectNumber); | |
| 2686 | + // 查询退卡数量 | |
| 2687 | + var refundedCount = await _db.Queryable<LqHytkMxEntity>().Where(x => x.BillingItemId == billingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).SumAsync(x => x.ProjectNumber); | |
| 2688 | + // 查询储扣数量 | |
| 2689 | + var deductCount = await _db.Queryable<LqKdDeductinfoEntity>().Where(x => x.DeductId == billingItemId && x.IsEffective == StatusEnum.有效.GetHashCode()).SumAsync(x => x.ProjectNumber); | |
| 2690 | + // 计算剩余数量 | |
| 2691 | + var remainingCount = (int)(purchasedCount - consumedCount - refundedCount - deductCount); | |
| 2692 | + return Math.Max(0, remainingCount); // 确保不为负数 | |
| 2693 | + } | |
| 2694 | + catch (Exception ex) | |
| 2695 | + { | |
| 2696 | + _logger.LogError(ex, "获取品项剩余数量失败,品项ID:{BillingItemId}", billingItemId); | |
| 2697 | + throw NCCException.Oh($"获取品项剩余数量失败:{ex.Message}"); | |
| 2698 | + } | |
| 2699 | + } | |
| 2700 | + #endregion | |
| 2701 | + | |
| 2313 | 2702 | |
| 2314 | 2703 | } |
| 2315 | 2704 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqStudyClassService.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using System.Linq; | |
| 4 | +using System.Threading.Tasks; | |
| 5 | +using Microsoft.AspNetCore.Mvc; | |
| 6 | +using Microsoft.Extensions.Logging; | |
| 7 | +using NCC.Common.Core.Manager; | |
| 8 | +using NCC.Common.Enum; | |
| 9 | +using NCC.Common.Filter; | |
| 10 | +using NCC.Dependency; | |
| 11 | +using NCC.DynamicApiController; | |
| 12 | +using NCC.Extend.Entitys.Dto.LqStudyClass; | |
| 13 | +using NCC.Extend.Entitys.lq_study_class; | |
| 14 | +using NCC.Extend.Entitys.lq_study_student; | |
| 15 | +using NCC.Extend.Entitys.lq_study_record; | |
| 16 | +using NCC.Extend.Interfaces.LqStudyClass; | |
| 17 | +using NCC.FriendlyException; | |
| 18 | +using NCC.System.Entitys.Permission; | |
| 19 | +using SqlSugar; | |
| 20 | +using Yitter.IdGenerator; | |
| 21 | +using NCC.Extend.Entitys.Enum; | |
| 22 | + | |
| 23 | +namespace NCC.Extend | |
| 24 | +{ | |
| 25 | + /// <summary> | |
| 26 | + /// 学习班级服务 | |
| 27 | + /// </summary> | |
| 28 | + [ApiDescriptionSettings(Tag = "绿纤学习班级管理", Name = "LqStudyClass", Order = 200)] | |
| 29 | + [Route("api/Extend/LqStudyClass")] | |
| 30 | + public class LqStudyClassService : IDynamicApiController, ITransient, ILqStudyClassService | |
| 31 | + { | |
| 32 | + private readonly IUserManager _userManager; | |
| 33 | + private readonly ILogger<LqStudyClassService> _logger; | |
| 34 | + private readonly ISqlSugarClient _db; | |
| 35 | + | |
| 36 | + /// <summary> | |
| 37 | + /// 构造函数 | |
| 38 | + /// </summary> | |
| 39 | + /// <param name="userManager">用户管理器</param> | |
| 40 | + /// <param name="logger">日志记录器</param> | |
| 41 | + /// <param name="db">数据库客户端</param> | |
| 42 | + public LqStudyClassService(IUserManager userManager, ILogger<LqStudyClassService> logger, ISqlSugarClient db) | |
| 43 | + { | |
| 44 | + _userManager = userManager; | |
| 45 | + _logger = logger; | |
| 46 | + _db = db; | |
| 47 | + } | |
| 48 | + | |
| 49 | + #region 创建学习班级并添加学员 | |
| 50 | + /// <summary> | |
| 51 | + /// 创建学习班级并添加学员 | |
| 52 | + /// </summary> | |
| 53 | + /// <param name="input">创建输入</param> | |
| 54 | + /// <returns>创建结果</returns> | |
| 55 | + [HttpPost("CreateClassWithStudents")] | |
| 56 | + public async Task<dynamic> CreateClassWithStudentsAsync([FromBody] LqStudyClassCreateWithStudentsInput input) | |
| 57 | + { | |
| 58 | + try | |
| 59 | + { | |
| 60 | + _db.Ado.BeginTran(); | |
| 61 | + | |
| 62 | + // 创建班级 | |
| 63 | + var classId = YitIdHelper.NextId().ToString(); | |
| 64 | + var classEntity = new LqStudyClassEntity | |
| 65 | + { | |
| 66 | + Id = classId, | |
| 67 | + ClassName = input.ClassName, | |
| 68 | + TeacherId = input.TeacherId, | |
| 69 | + StartTime = input.StartTime, | |
| 70 | + EndTime = input.EndTime, | |
| 71 | + Remark = input.Remark, | |
| 72 | + CreateUser = _userManager.UserId, | |
| 73 | + CreateTime = DateTime.Now, | |
| 74 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 75 | + }; | |
| 76 | + | |
| 77 | + await _db.Insertable(classEntity).ExecuteCommandAsync(); | |
| 78 | + | |
| 79 | + // 创建学员 | |
| 80 | + var studentEntities = new List<LqStudyStudentEntity>(); | |
| 81 | + foreach (var student in input.Students) | |
| 82 | + { | |
| 83 | + var studentEntity = new LqStudyStudentEntity | |
| 84 | + { | |
| 85 | + Id = YitIdHelper.NextId().ToString(), | |
| 86 | + EmployeeName = student.EmployeeName, | |
| 87 | + EmployeePhone = student.EmployeePhone, | |
| 88 | + EmployeeId = student.EmployeeId, | |
| 89 | + AdmissionTime = student.AdmissionTime, | |
| 90 | + ClassId = classId, | |
| 91 | + ClassName = input.ClassName, | |
| 92 | + HrBelong = student.HrBelong, | |
| 93 | + CreateUser = _userManager.UserId, | |
| 94 | + CreateTime = DateTime.Now, | |
| 95 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 96 | + }; | |
| 97 | + studentEntities.Add(studentEntity); | |
| 98 | + } | |
| 99 | + | |
| 100 | + if (studentEntities.Any()) | |
| 101 | + { | |
| 102 | + await _db.Insertable(studentEntities).ExecuteCommandAsync(); | |
| 103 | + } | |
| 104 | + | |
| 105 | + _db.Ado.CommitTran(); | |
| 106 | + | |
| 107 | + return new | |
| 108 | + { | |
| 109 | + success = true, | |
| 110 | + data = new | |
| 111 | + { | |
| 112 | + classId = classId, | |
| 113 | + className = input.ClassName, | |
| 114 | + studentCount = studentEntities.Count, | |
| 115 | + message = $"成功创建班级'{input.ClassName}'并添加{studentEntities.Count}名学员" | |
| 116 | + }, | |
| 117 | + message = "创建成功" | |
| 118 | + }; | |
| 119 | + } | |
| 120 | + catch (Exception ex) | |
| 121 | + { | |
| 122 | + _db.Ado.RollbackTran(); | |
| 123 | + _logger.LogError(ex, "创建学习班级并添加学员失败"); | |
| 124 | + throw NCCException.Oh($"创建失败:{ex.Message}"); | |
| 125 | + } | |
| 126 | + } | |
| 127 | + | |
| 128 | + #endregion | |
| 129 | + | |
| 130 | + #region 向现有班级添加学员 | |
| 131 | + /// <summary> | |
| 132 | + /// 向现有班级添加学员 | |
| 133 | + /// </summary> | |
| 134 | + /// <param name="input">添加学员输入</param> | |
| 135 | + /// <returns>添加结果</returns> | |
| 136 | + [HttpPost("AddStudentsToClass")] | |
| 137 | + public async Task<dynamic> AddStudentsToClassAsync([FromBody] LqStudyClassAddStudentsInput input) | |
| 138 | + { | |
| 139 | + try | |
| 140 | + { | |
| 141 | + // 验证班级是否存在 | |
| 142 | + var classInfo = await _db.Queryable<LqStudyClassEntity>() | |
| 143 | + .Where(x => x.Id == input.ClassId && x.IsEffective == StatusEnum.有效.GetHashCode()) | |
| 144 | + .FirstAsync(); | |
| 145 | + | |
| 146 | + if (classInfo == null) | |
| 147 | + { | |
| 148 | + throw NCCException.Oh("班级不存在或已失效"); | |
| 149 | + } | |
| 150 | + | |
| 151 | + _db.Ado.BeginTran(); | |
| 152 | + | |
| 153 | + // 创建学员 | |
| 154 | + var studentEntities = new List<LqStudyStudentEntity>(); | |
| 155 | + foreach (var student in input.Students) | |
| 156 | + { | |
| 157 | + var studentEntity = new LqStudyStudentEntity | |
| 158 | + { | |
| 159 | + Id = YitIdHelper.NextId().ToString(), | |
| 160 | + EmployeeName = student.EmployeeName, | |
| 161 | + EmployeePhone = student.EmployeePhone, | |
| 162 | + EmployeeId = student.EmployeeId, | |
| 163 | + AdmissionTime = student.AdmissionTime, | |
| 164 | + ClassId = input.ClassId, | |
| 165 | + ClassName = classInfo.ClassName, | |
| 166 | + HrBelong = student.HrBelong, | |
| 167 | + CreateUser = _userManager.UserId, | |
| 168 | + CreateTime = DateTime.Now, | |
| 169 | + IsEffective = StatusEnum.有效.GetHashCode() | |
| 170 | + }; | |
| 171 | + studentEntities.Add(studentEntity); | |
| 172 | + } | |
| 173 | + | |
| 174 | + if (studentEntities.Any()) | |
| 175 | + { | |
| 176 | + await _db.Insertable(studentEntities).ExecuteCommandAsync(); | |
| 177 | + } | |
| 178 | + | |
| 179 | + _db.Ado.CommitTran(); | |
| 180 | + | |
| 181 | + return new | |
| 182 | + { | |
| 183 | + classId = input.ClassId, | |
| 184 | + className = classInfo.ClassName, | |
| 185 | + addedStudentCount = studentEntities.Count, | |
| 186 | + message = $"成功向班级'{classInfo.ClassName}'添加{studentEntities.Count}名学员" | |
| 187 | + }; | |
| 188 | + } | |
| 189 | + catch (Exception ex) | |
| 190 | + { | |
| 191 | + _db.Ado.RollbackTran(); | |
| 192 | + _logger.LogError(ex, "向班级添加学员失败"); | |
| 193 | + throw NCCException.Oh($"添加失败:{ex.Message}"); | |
| 194 | + } | |
| 195 | + } | |
| 196 | + #endregion | |
| 197 | + | |
| 198 | + #region 获取所有班级列表 | |
| 199 | + /// <summary> | |
| 200 | + /// 获取所有班级列表 | |
| 201 | + /// </summary> | |
| 202 | + /// <param name="input">查询输入</param> | |
| 203 | + /// <returns>班级列表</returns> | |
| 204 | + [HttpGet("GetClassList")] | |
| 205 | + public async Task<dynamic> GetClassListAsync([FromQuery] LqStudyClassListQueryInput input) | |
| 206 | + { | |
| 207 | + try | |
| 208 | + { | |
| 209 | + var sidx = input.sidx == null ? "id" : input.sidx; | |
| 210 | + | |
| 211 | + // 查询班级信息 | |
| 212 | + var data = await _db.Queryable<LqStudyClassEntity>() | |
| 213 | + .WhereIF(!string.IsNullOrWhiteSpace(input.ClassName), x => x.ClassName.Contains(input.ClassName)) | |
| 214 | + .WhereIF(!string.IsNullOrWhiteSpace(input.TeacherId), x => x.TeacherId == input.TeacherId) | |
| 215 | + .WhereIF(input.StartTime.HasValue, x => x.StartTime >= input.StartTime.Value) | |
| 216 | + .WhereIF(input.EndTime.HasValue, x => x.StartTime <= input.EndTime.Value) | |
| 217 | + .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value) | |
| 218 | + .Select(x => new LqStudyClassListOutput | |
| 219 | + { | |
| 220 | + id = x.Id, | |
| 221 | + className = x.ClassName, | |
| 222 | + teacherId = x.TeacherId, | |
| 223 | + teacherName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.TeacherId).Select(u => u.RealName), | |
| 224 | + startTime = x.StartTime, | |
| 225 | + endTime = x.EndTime, | |
| 226 | + remark = x.Remark, | |
| 227 | + }) | |
| 228 | + .MergeTable() | |
| 229 | + .OrderBy(sidx + " " + input.sort) | |
| 230 | + .ToPagedListAsync(input.currentPage, input.pageSize); | |
| 231 | + return PageResult<LqStudyClassListOutput>.SqlSugarPageResult(data); | |
| 232 | + } | |
| 233 | + catch (Exception ex) | |
| 234 | + { | |
| 235 | + _logger.LogError(ex, "获取班级列表失败"); | |
| 236 | + throw NCCException.Oh($"获取班级列表失败:{ex.Message}"); | |
| 237 | + } | |
| 238 | + } | |
| 239 | + #endregion | |
| 240 | + | |
| 241 | + #region 获取班级下所有学员信息 | |
| 242 | + /// <summary> | |
| 243 | + /// 获取班级下所有学员信息(分页) | |
| 244 | + /// </summary> | |
| 245 | + /// <param name="input">查询输入</param> | |
| 246 | + /// <returns>学员列表</returns> | |
| 247 | + [HttpGet("GetStudentListByClassId")] | |
| 248 | + public async Task<dynamic> GetStudentListByClassIdAsync([FromQuery] LqStudyStudentListQueryInput input) | |
| 249 | + { | |
| 250 | + try | |
| 251 | + { | |
| 252 | + var sidx = input.sidx == null ? "id" : input.sidx; | |
| 253 | + // 查询学员信息 | |
| 254 | + var data = await _db.Queryable<LqStudyStudentEntity>() | |
| 255 | + .Where(x => x.ClassId == input.ClassId) | |
| 256 | + .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeeName), x => x.EmployeeName.Contains(input.EmployeeName)) | |
| 257 | + .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeePhone), x => x.EmployeePhone.Contains(input.EmployeePhone)) | |
| 258 | + .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeeId), x => x.EmployeeId == input.EmployeeId) | |
| 259 | + .WhereIF(!string.IsNullOrWhiteSpace(input.HrBelong), x => x.HrBelong.Contains(input.HrBelong)) | |
| 260 | + .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value) | |
| 261 | + .Select(x => new LqStudyStudentListOutput | |
| 262 | + { | |
| 263 | + id = x.Id, | |
| 264 | + employeeName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.EmployeeId).Select(u => u.RealName), | |
| 265 | + employeePhone = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.EmployeeId).Select(u => u.MobilePhone), | |
| 266 | + employeeId = x.EmployeeId, | |
| 267 | + admissionTime = x.AdmissionTime, | |
| 268 | + classId = x.ClassId, | |
| 269 | + className = x.ClassName | |
| 270 | + }) | |
| 271 | + .MergeTable() | |
| 272 | + .OrderBy(sidx + " " + input.sort) | |
| 273 | + .ToPagedListAsync(input.currentPage, input.pageSize); | |
| 274 | + return PageResult<LqStudyStudentListOutput>.SqlSugarPageResult(data); | |
| 275 | + } | |
| 276 | + catch (Exception ex) | |
| 277 | + { | |
| 278 | + _logger.LogError(ex, "获取班级学员列表失败"); | |
| 279 | + throw NCCException.Oh($"获取班级学员列表失败:{ex.Message}"); | |
| 280 | + } | |
| 281 | + } | |
| 282 | + #endregion | |
| 283 | + | |
| 284 | + #region 学习记录管理 | |
| 285 | + /// <summary> | |
| 286 | + /// 添加学习记录 | |
| 287 | + /// </summary> | |
| 288 | + /// <param name="input">学习记录输入</param> | |
| 289 | + /// <returns>添加结果</returns> | |
| 290 | + [HttpPost("AddStudyRecord")] | |
| 291 | + public async Task AddStudyRecordAsync([FromBody] LqStudyRecordCreateInput input) | |
| 292 | + { | |
| 293 | + // 验证员工是否存在 | |
| 294 | + var employee = await _db.Queryable<UserEntity>() | |
| 295 | + .Where(x => x.Id == input.EmployeeId && x.RealName == input.EmployeeName) | |
| 296 | + .FirstAsync(); | |
| 297 | + | |
| 298 | + if (employee == null) | |
| 299 | + { | |
| 300 | + throw NCCException.Oh("员工不存在,请检查员工ID和姓名是否正确"); | |
| 301 | + } | |
| 302 | + | |
| 303 | + // 如果选择下店协助,验证门店信息 | |
| 304 | + if (input.IsStoreAssist == 1) | |
| 305 | + { | |
| 306 | + if (string.IsNullOrWhiteSpace(input.StoreId) || string.IsNullOrWhiteSpace(input.StoreName)) | |
| 307 | + { | |
| 308 | + throw NCCException.Oh("选择下店协助时,门店ID和门店名称不能为空"); | |
| 309 | + } | |
| 310 | + } | |
| 311 | + // 创建学习记录 | |
| 312 | + var recordEntity = new LqStudyRecordEntity | |
| 313 | + { | |
| 314 | + Id = YitIdHelper.NextId().ToString(), | |
| 315 | + EmployeeName = input.EmployeeName, | |
| 316 | + EmployeeId = input.EmployeeId, | |
| 317 | + StudyType = input.StudyType, | |
| 318 | + TransportFee = input.TransportFee, | |
| 319 | + StudyDate = input.StudyDate, | |
| 320 | + DailyStatus = input.DailyStatus, | |
| 321 | + Remark = input.Remark, | |
| 322 | + IsStoreAssist = input.IsStoreAssist, | |
| 323 | + StoreId = input.IsStoreAssist == 1 ? input.StoreId : null, | |
| 324 | + StoreName = input.IsStoreAssist == 1 ? input.StoreName : null, | |
| 325 | + CreateUser = _userManager.UserId, | |
| 326 | + CreateTime = DateTime.Now, | |
| 327 | + IsEffective = 1 | |
| 328 | + }; | |
| 329 | + var isOk = await _db.Insertable(recordEntity).ExecuteCommandAsync(); | |
| 330 | + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 331 | + } | |
| 332 | + #endregion | |
| 333 | + | |
| 334 | + #region 获取学习记录列表 | |
| 335 | + /// <summary> | |
| 336 | + /// 获取学习记录列表 | |
| 337 | + /// </summary> | |
| 338 | + /// <param name="input">查询输入</param> | |
| 339 | + /// <returns>学习记录列表</returns> | |
| 340 | + [HttpGet("GetStudyRecordList")] | |
| 341 | + public async Task<dynamic> GetStudyRecordListAsync([FromQuery] LqStudyRecordListQueryInput input) | |
| 342 | + { | |
| 343 | + try | |
| 344 | + { | |
| 345 | + var sidx = input.sidx == null ? "id" : input.sidx; | |
| 346 | + | |
| 347 | + // 查询学习记录信息 | |
| 348 | + var data = await _db.Queryable<LqStudyRecordEntity>() | |
| 349 | + .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeeName), x => x.EmployeeName.Contains(input.EmployeeName)) | |
| 350 | + .WhereIF(!string.IsNullOrWhiteSpace(input.EmployeeId), x => x.EmployeeId == input.EmployeeId) | |
| 351 | + .WhereIF(!string.IsNullOrWhiteSpace(input.StudyType), x => x.StudyType.Contains(input.StudyType)) | |
| 352 | + .WhereIF(input.StudyDateStart.HasValue, x => x.StudyDate >= input.StudyDateStart.Value) | |
| 353 | + .WhereIF(input.StudyDateEnd.HasValue, x => x.StudyDate <= input.StudyDateEnd.Value) | |
| 354 | + .WhereIF(!string.IsNullOrWhiteSpace(input.DailyStatus), x => x.DailyStatus.Contains(input.DailyStatus)) | |
| 355 | + .WhereIF(input.IsStoreAssist.HasValue, x => x.IsStoreAssist == input.IsStoreAssist.Value) | |
| 356 | + .WhereIF(!string.IsNullOrWhiteSpace(input.StoreId), x => x.StoreId == input.StoreId) | |
| 357 | + .WhereIF(input.IsEffective.HasValue, x => x.IsEffective == input.IsEffective.Value) | |
| 358 | + .Select(x => new LqStudyRecordListOutput | |
| 359 | + { | |
| 360 | + id = x.Id, | |
| 361 | + employeeName = x.EmployeeName, | |
| 362 | + employeeId = x.EmployeeId, | |
| 363 | + studyType = x.StudyType, | |
| 364 | + transportFee = x.TransportFee, | |
| 365 | + studyDate = x.StudyDate, | |
| 366 | + dailyStatus = x.DailyStatus, | |
| 367 | + remark = x.Remark, | |
| 368 | + isStoreAssist = x.IsStoreAssist, | |
| 369 | + storeId = x.StoreId, | |
| 370 | + storeName = x.StoreName, | |
| 371 | + createUser = x.CreateUser, | |
| 372 | + createUserName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.CreateUser).Select(u => u.RealName), | |
| 373 | + createTime = x.CreateTime, | |
| 374 | + updateUser = x.UpdateUser, | |
| 375 | + updateUserName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == x.UpdateUser).Select(u => u.RealName), | |
| 376 | + updateTime = x.UpdateTime, | |
| 377 | + isEffective = x.IsEffective | |
| 378 | + }) | |
| 379 | + .MergeTable() | |
| 380 | + .OrderBy(sidx + " " + input.sort) | |
| 381 | + .ToPagedListAsync(input.currentPage, input.pageSize); | |
| 382 | + return PageResult<LqStudyRecordListOutput>.SqlSugarPageResult(data); | |
| 383 | + } | |
| 384 | + catch (Exception ex) | |
| 385 | + { | |
| 386 | + _logger.LogError(ex, "获取学习记录列表失败"); | |
| 387 | + throw NCCException.Oh($"获取学习记录列表失败:{ex.Message}"); | |
| 388 | + } | |
| 389 | + } | |
| 390 | + #endregion | |
| 391 | + | |
| 392 | + #region 作废学习记录 | |
| 393 | + /// <summary> | |
| 394 | + /// 作废学习记录 | |
| 395 | + /// </summary> | |
| 396 | + /// <param name="id">学习记录ID</param> | |
| 397 | + /// <returns>作废结果</returns> | |
| 398 | + [HttpPost("CancelStudyRecord")] | |
| 399 | + public async Task CancelStudyRecordAsync([FromBody] string id) | |
| 400 | + { | |
| 401 | + var record = await _db.Queryable<LqStudyRecordEntity>().Where(x => x.Id == id).FirstAsync(); | |
| 402 | + if (record == null) throw NCCException.Oh("学习记录不存在"); | |
| 403 | + record.IsEffective = StatusEnum.无效.GetHashCode(); | |
| 404 | + record.UpdateTime = DateTime.Now; | |
| 405 | + record.UpdateUser = _userManager.UserId; | |
| 406 | + var isOk = await _db.Updateable(record).ExecuteCommandAsync(); | |
| 407 | + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 408 | + } | |
| 409 | + #endregion | |
| 410 | + } | |
| 411 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqYcsdDysbmxbService.cs
| ... | ... | @@ -28,7 +28,7 @@ namespace NCC.Extend.LqYcsdDysbmxb |
| 28 | 28 | /// <summary> |
| 29 | 29 | /// 当月社保明细表服务 |
| 30 | 30 | /// </summary> |
| 31 | - [ApiDescriptionSettings(Tag = "Extend",Name = "LqYcsdDysbmxb", Order = 200)] | |
| 31 | + [ApiDescriptionSettings(Tag = "Extend", Name = "LqYcsdDysbmxb", Order = 200)] | |
| 32 | 32 | [Route("api/Extend/[controller]")] |
| 33 | 33 | public class LqYcsdDysbmxbService : ILqYcsdDysbmxbService, IDynamicApiController, ITransient |
| 34 | 34 | { |
| ... | ... | @@ -43,7 +43,7 @@ namespace NCC.Extend.LqYcsdDysbmxb |
| 43 | 43 | ISqlSugarRepository<LqYcsdDysbmxbEntity> lqYcsdDysbmxbRepository, |
| 44 | 44 | IUserManager userManager) |
| 45 | 45 | { |
| 46 | - _lqYcsdDysbmxbRepository = lqYcsdDysbmxbRepository; | |
| 46 | + _lqYcsdDysbmxbRepository = lqYcsdDysbmxbRepository; | |
| 47 | 47 | _db = _lqYcsdDysbmxbRepository.Context; |
| 48 | 48 | _userManager = userManager; |
| 49 | 49 | } |
| ... | ... | @@ -84,23 +84,23 @@ namespace NCC.Extend.LqYcsdDysbmxb |
| 84 | 84 | .WhereIF(!string.IsNullOrEmpty(input.zj), p => p.Zj.Equals(input.zj)) |
| 85 | 85 | .WhereIF(!string.IsNullOrEmpty(input.gzk), p => p.Gzk.Equals(input.gzk)) |
| 86 | 86 | .WhereIF(!string.IsNullOrEmpty(input.cb), p => p.Cb.Equals(input.cb)) |
| 87 | - .Select(it=> new LqYcsdDysbmxbListOutput | |
| 87 | + .Select(it => new LqYcsdDysbmxbListOutput | |
| 88 | 88 | { |
| 89 | 89 | id = it.Id, |
| 90 | - xm=it.Xm, | |
| 91 | - md1=it.Md1, | |
| 92 | - md2=it.Md2, | |
| 93 | - gmmd=it.Gmmd, | |
| 94 | - hxcb=it.Hxcb, | |
| 95 | - cbyf=it.Cbyf, | |
| 96 | - yf=it.Yf, | |
| 97 | - sb=it.Sb, | |
| 98 | - yb=it.Yb, | |
| 99 | - zj=it.Zj, | |
| 100 | - gzk=it.Gzk, | |
| 101 | - cb=it.Cb, | |
| 102 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 103 | - return PageResult<LqYcsdDysbmxbListOutput>.SqlSugarPageResult(data); | |
| 90 | + xm = it.Xm, | |
| 91 | + md1 = it.Md1, | |
| 92 | + md2 = it.Md2, | |
| 93 | + gmmd = it.Gmmd, | |
| 94 | + hxcb = it.Hxcb, | |
| 95 | + cbyf = it.Cbyf, | |
| 96 | + yf = it.Yf, | |
| 97 | + sb = it.Sb, | |
| 98 | + yb = it.Yb, | |
| 99 | + zj = it.Zj, | |
| 100 | + gzk = it.Gzk, | |
| 101 | + cb = it.Cb, | |
| 102 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 103 | + return PageResult<LqYcsdDysbmxbListOutput>.SqlSugarPageResult(data); | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /// <summary> |
| ... | ... | @@ -141,23 +141,23 @@ namespace NCC.Extend.LqYcsdDysbmxb |
| 141 | 141 | .WhereIF(!string.IsNullOrEmpty(input.zj), p => p.Zj.Equals(input.zj)) |
| 142 | 142 | .WhereIF(!string.IsNullOrEmpty(input.gzk), p => p.Gzk.Equals(input.gzk)) |
| 143 | 143 | .WhereIF(!string.IsNullOrEmpty(input.cb), p => p.Cb.Equals(input.cb)) |
| 144 | - .Select(it=> new LqYcsdDysbmxbListOutput | |
| 144 | + .Select(it => new LqYcsdDysbmxbListOutput | |
| 145 | 145 | { |
| 146 | 146 | id = it.Id, |
| 147 | - xm=it.Xm, | |
| 148 | - md1=it.Md1, | |
| 149 | - md2=it.Md2, | |
| 150 | - gmmd=it.Gmmd, | |
| 151 | - hxcb=it.Hxcb, | |
| 152 | - cbyf=it.Cbyf, | |
| 153 | - yf=it.Yf, | |
| 154 | - sb=it.Sb, | |
| 155 | - yb=it.Yb, | |
| 156 | - zj=it.Zj, | |
| 157 | - gzk=it.Gzk, | |
| 158 | - cb=it.Cb, | |
| 159 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); | |
| 160 | - return data; | |
| 147 | + xm = it.Xm, | |
| 148 | + md1 = it.Md1, | |
| 149 | + md2 = it.Md2, | |
| 150 | + gmmd = it.Gmmd, | |
| 151 | + hxcb = it.Hxcb, | |
| 152 | + cbyf = it.Cbyf, | |
| 153 | + yf = it.Yf, | |
| 154 | + sb = it.Sb, | |
| 155 | + yb = it.Yb, | |
| 156 | + zj = it.Zj, | |
| 157 | + gzk = it.Gzk, | |
| 158 | + cb = it.Cb, | |
| 159 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync(); | |
| 160 | + return data; | |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /// <summary> |
| ... | ... | @@ -179,7 +179,7 @@ namespace NCC.Extend.LqYcsdDysbmxb |
| 179 | 179 | { |
| 180 | 180 | exportData = await this.GetNoPagingList(input); |
| 181 | 181 | } |
| 182 | - List<ParamsModel> 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<ParamsModel>(); | |
| 182 | + List<ParamsModel> 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<ParamsModel>(); | |
| 183 | 183 | ExcelConfig excelconfig = new ExcelConfig(); |
| 184 | 184 | excelconfig.FileName = "当月社保明细表.xls"; |
| 185 | 185 | excelconfig.HeadFont = "微软雅黑"; |
| ... | ... | @@ -222,7 +222,7 @@ namespace NCC.Extend.LqYcsdDysbmxb |
| 222 | 222 | //开启事务 |
| 223 | 223 | _db.BeginTran(); |
| 224 | 224 | //批量删除当月社保明细表 |
| 225 | - await _db.Deleteable<LqYcsdDysbmxbEntity>().In(d => d.Id,ids).ExecuteCommandAsync(); | |
| 225 | + await _db.Deleteable<LqYcsdDysbmxbEntity>().In(d => d.Id, ids).ExecuteCommandAsync(); | |
| 226 | 226 | //关闭事务 |
| 227 | 227 | _db.CommitTran(); |
| 228 | 228 | } | ... | ... |