Quellcode durchsuchen

【修改】Domain.Entities.Groups.Grp_ScheduleDetailInfo
:因需要实现DeepClone,取消继承EntityBase,
【新增】
BusinessController:通用业务

jiangjc vor 1 Jahr
Ursprung
Commit
9bb5e1e0a3

+ 47 - 0
OASystem/OASystem.Api/Controllers/BusinessController.cs

@@ -0,0 +1,47 @@
+using Microsoft.AspNetCore.Mvc;
+using OASystem.Domain.Entities.Groups;
+using OASystem.Domain.ViewModels.Groups;
+using OASystem.Infrastructure.Repositories.Business;
+
+namespace OASystem.API.Controllers
+{
+    /// <summary>
+    /// 通用业务操作
+    /// </summary>
+    [Route("api/[controller]/[action]")]
+    public class BusinessController : ControllerBase
+    {
+        private readonly IMapper _mapper;
+        private readonly CommonBusRepositroy _busRep;
+        public BusinessController(IMapper mapper, CommonBusRepositroy busRep)
+        {
+            _mapper = mapper;
+            _busRep = busRep;
+        }
+
+        #region 会务物料单
+
+        /// <summary>
+        /// 获取会务活动列表
+        /// </summary>
+        /// <param name="paras"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostConferenceList()
+        {
+            List<Grp_DelegationInfo> listSource = _busRep.Query<Grp_DelegationInfo>(s => s.TeamDid == 691).ToList();
+            List<GroupNameView> viewList = new List<GroupNameView>();
+            foreach (var group in listSource)
+            {
+                GroupNameView _view = new GroupNameView();
+                _view.Id=group.Id;
+                _view.GroupName = group.TeamName;
+            }
+
+            return Ok(JsonView(viewList));
+        }
+
+        #endregion
+    }
+}

+ 42 - 1
OASystem/OASystem.Domain/Entities/Groups/Grp_ScheduleInfo.cs

@@ -72,10 +72,48 @@ namespace OASystem.Domain.Entities.Groups
 
     /// <summary>
     /// 团组流程管控详细进度
+    /// 因为要实现DeepClone 字段必须在同一类下所以不能继承EntityBase
     /// </summary>
     [SugarTable("Grp_ScheduleDetail")]
-    public class Grp_ScheduleDetailInfo : EntityBase, ICloneable
+    [Serializable]
+    public class Grp_ScheduleDetailInfo : ICloneable
     {
+        /// <summary>
+        /// 编号
+        /// </summary>
+        [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, IsNullable = false)]
+        public int Id { get; set; }
+        /// <summary>
+        /// 创建者Id
+        /// </summary>
+        [SugarColumn(ColumnDescription = "创建者Id", IsNullable = true, ColumnDataType = "int")]
+        public int CreateUserId { get; set; }
+        /// <summary>
+        /// 创建时间
+        /// </summary>
+        [SugarColumn(ColumnDescription = "创建时间", IsNullable = true, ColumnDataType = "DateTime")]
+        public DateTime CreateTime { get; set; } = DateTime.Now;
+        /// <summary>
+        /// 删除者Id
+        /// </summary>
+        [SugarColumn(ColumnDescription = "删除者Id", IsNullable = true, ColumnDataType = "int")]
+        public int? DeleteUserId { get; set; }
+        /// <summary>
+        /// 删除时间
+        /// </summary>
+        [SugarColumn(ColumnDescription = "删除时间", IsNullable = true, ColumnDataType = "varchar(30)")]
+        public string DeleteTime { get; set; }
+        /// <summary>
+        /// 备注
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
+        public string Remark { get; set; }
+        /// <summary>
+        /// 是否删除
+        /// </summary>
+        [SugarColumn(ColumnDescription = "是否删除", IsNullable = true, ColumnDataType = "int")]
+        public int IsDel { get; set; }
+
         /// <summary>
         /// 团组流程Id
         /// </summary>
@@ -153,6 +191,9 @@ namespace OASystem.Domain.Entities.Groups
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int Exception { get; set; }
 
+
+
+        
         public object Clone()
         {
             return this.MemberwiseClone();

+ 2 - 2
OASystem/OASystem.Domain/ViewModels/Group/DelegationInfoView.cs

@@ -8,7 +8,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace OASystem.Domain.ViewModels.Group
+namespace OASystem.Domain.ViewModels.Groups
 {
     /// <summary>
     /// 接团信息
@@ -233,7 +233,7 @@ namespace OASystem.Domain.ViewModels.Group
 
     /// <summary>
     /// 团组名称
-    /// 返回
+    /// 返回
     /// </summary>
     public class GroupNameView
     {

+ 17 - 0
OASystem/OASystem.Infrastructure/Repositories/Business/CommonBusRepositroy.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Infrastructure.Repositories.Business
+{
+    public class CommonBusRepositroy : BaseRepository<EntityBase, ViewBase>
+    {
+        public CommonBusRepositroy(SqlSugarClient sqlSugar) : base(sqlSugar)
+        {
+        }
+
+
+    }
+}

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/CRM/VisaDeleClientRepository.cs

@@ -5,7 +5,7 @@ using OASystem.Domain.Dtos.UserDto;
 using OASystem.Domain.Entities.Customer;
 using OASystem.Domain.Entities.Groups;
 using OASystem.Domain.ViewModels.CRM;
-using OASystem.Domain.ViewModels.Group;
+using OASystem.Domain.ViewModels.Groups;
 using System;
 using System.Collections.Generic;
 using System.Linq;

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs

@@ -4,7 +4,7 @@ using OASystem.Domain.Dtos.Groups;
 using OASystem.Domain.Dtos.UserDto;
 using OASystem.Domain.Entities.Groups;
 using OASystem.Domain.ViewModels.CRM;
-using OASystem.Domain.ViewModels.Group;
+using OASystem.Domain.ViewModels.Groups;
 using OASystem.Infrastructure.Repositories.System;
 using Org.BouncyCastle.Asn1.Cms;
 using Org.BouncyCastle.Utilities.Collections;