Browse Source

新增表数据字典,根据舱位类型查询团组客户

wangh 1 year ago
parent
commit
7372e2a738

+ 1 - 0
OASystem/EntitySync/Program.cs

@@ -102,5 +102,6 @@ db.CodeFirst.SetStringDefaultLength(50).BackupTable().InitTables(new Type[]
     //typeof(Res_OfficialActivities)     //公务出访
     //typeof(Res_AskData),//请示数据库
     //typeof(Grp_DelegationEnData)
+    //typeof(Crm_GroupCustomer)
 });
 Console.WriteLine("数据库结构同步完成!");

+ 36 - 0
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -851,6 +851,42 @@ namespace OASystem.API.Controllers
                 throw;
             }
         }
+        /// <summary>
+        /// 根据舱位类型查询接团客户名单信息
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> tankType(AirTicketResByIdDto dto)
+        {
+            try
+            {
+                List<Crm_GroupCustomer> crm_Groups = _sqlSugar.Queryable<Crm_GroupCustomer>().Where(a=>a.IsDel==0 && a.AirType==dto.Id).ToList();
+                if (crm_Groups.Count!=0)
+                {
+                    List<dynamic> Customer = new List<dynamic>();
+                    foreach (var item in crm_Groups)
+                    {
+                        var data = new
+                        {
+                            Id = item.Id,
+                            Pinyin = item.Pinyin,
+                            Name = item.LastName+item.FirstName
+                        };
+                        Customer.Add(data);
+                    }
+                    return Ok(JsonView(true, "查询成功!", Customer));
+                }
+                return Ok(JsonView(true, "暂无数据", crm_Groups));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+
         /// <summary>
         /// 机票费用录入,删除
         /// </summary>

+ 9 - 0
OASystem/OASystem.Domain/Dtos/Groups/AirTicketResDto.cs

@@ -106,6 +106,15 @@ namespace OASystem.Domain.Dtos.Groups
         /// </summary>
         public int IsTrain { get; set; }
         /// <summary>
+        /// 航班日期
+        /// </summary>
+        public string FlightsDate { get; set; }
+
+        /// <summary>
+        /// 航班时间
+        /// </summary>
+        public string FlightsTime { get; set; }
+        /// <summary>
         /// 航班号
         /// </summary>
         public string FlightsCode { get; set; }

+ 114 - 0
OASystem/OASystem.Domain/Entities/Customer/Crm_GroupCustomer.cs

@@ -0,0 +1,114 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Customer
+{
+    /// <summary>
+    /// 接团信息客户表
+    /// </summary>
+    [SugarTable("Crm_GroupCustomer")]
+    public class Crm_GroupCustomer:EntityBase
+    {
+        /// <summary>
+        ///  团组Id
+        /// </summary>
+        [SugarColumn(IsNullable =true,ColumnDataType ="int")]
+        public int DiId { get; set; }
+
+        /// <summary>
+        ///  名
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string FirstName { get; set; }
+        /// <summary>
+        ///  姓
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string LastName { get; set; }
+        /// <summary>
+        ///  拼音姓名
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        public string Pinyin { get; set; }
+        /// <summary>
+        ///  单位
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(300)")]
+        public string Company { get; set; }
+        /// <summary>
+        ///  职务
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        public string Job { get; set; }
+        /// <summary>
+        ///  手机电话
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Phone { get; set; }
+        /// <summary>
+        ///  性别
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int Sex { get; set; }
+        /// <summary>
+        ///  身份证
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string IDcard { get; set; }
+        /// <summary>
+        ///  护照类型
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        public string PassprotType { get; set; }
+        /// <summary>
+        /// 签发国家码
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string passportCountry { get; set; }
+        /// <summary>
+        ///  护照编号
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string PassportNo { get; set; }
+        /// <summary>
+        ///  护照签发地
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(300)")]
+        public string IssuePlace { get; set; }
+        /// <summary>
+        ///  护照签发日期
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "date")]
+        public DateTime IssueDate { get; set; }
+
+        /// <summary>
+        ///  护照有效期
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "date")]
+        public DateTime ExpiryDate { get; set; }
+        /// <summary>
+        ///  生日
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Birthday { get; set; }
+        /// <summary>
+        ///  舱位类型
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int AirType { get; set; }
+        /// <summary>
+        ///  舱位备注
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
+        public string AirRemark { get; set; }
+        /// <summary>
+        ///  房型
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(300)")]
+        public string RoomType { get; set; }
+
+    }
+}

+ 0 - 1
OASystem/OASystem.Domain/Entities/Resource/Res_AskData.cs

@@ -19,7 +19,6 @@ namespace OASystem.Domain.Entities.Resource
         public string DeleName { get; set; } = "";
         /// <summary>
         /// 国家
-        /// 
         /// </summary>
         [SugarColumn(IsNullable =true,ColumnDataType ="varchar(100)")]
         public string Country { get; set; }

+ 1 - 0
OASystem/OASystem.Domain/ViewModels/Groups/AirTicketReservationsView.cs

@@ -21,6 +21,7 @@ namespace OASystem.Domain.ViewModels.Groups
         public string CurrencyStr { get; set; }
 
         public string FlightDescription { get; set; }
+        public string ClientNameStr { get; set; }
     }
 
     public class AirGroupCostParameterView

+ 23 - 8
OASystem/OASystem.Infrastructure/Repositories/Groups/AirTicketResRepository.cs

@@ -75,7 +75,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
         public async Task<Result> AirTicketResList(AirTicketResDto dto)
         {
-            Result result = new Result() { Code = -2, Msg = "未知错误" };
+                Result result = new Result() { Code = -2, Msg = "未知错误" };
 
             Grp_DelegationInfo _DelegationInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().First(it => it.Id == dto.DiId);
             if (_DelegationInfo != null)
@@ -103,7 +103,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                 Res_ThreeCode arrData = _sqlSugar.Queryable<Res_ThreeCode>().First(it => it.IsDel == 0 && it.Three == arrCode);
 
                                 string day = spDotandEmpty[2].Substring(2, 2);//日
-                                string monthAbbreviations = spDotandEmpty[1].Substring(4, 3).ToUpper();//月份
+                                string monthAbbreviations = spDotandEmpty[2].Substring(4, 3).ToUpper();//月份
                                 switch (monthAbbreviations)
                                 {
                                     case "JAN":
@@ -146,7 +146,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                 string tate = $"{monthAbbreviations}月{day}日";
                                 item.FlightDescription += rowindex + ". " + depData.AirPort + " " + arrData.AirPort + "  (" + tate + ")\r\n";
                             }
-                            catch (Exception)
+                            catch (Exception ex)
                             {
                                 item.FlightDescription = "录入数据不规范!请检查";
                                 break;
@@ -217,7 +217,17 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 Grp_GroupCostParameter _GroupCostParameter = _sqlSugar.Queryable<Grp_GroupCostParameter>().First(a => a.DiId == dto.DiId);
 
                 AirGroupCostParameterView _AirgroupCostParameter = _mapper.Map<AirGroupCostParameterView>(_GroupCostParameter);
-
+                for (int i = 0; i <_AirTicketReservations.Count; i++)
+                {
+                  string [] ClientArr=  _AirTicketReservations[i].ClientName.Split(',');
+                    
+                    foreach (var item in ClientArr)
+                    {
+                        Crm_GroupCustomer crm_GroupCustomer = _sqlSugar.Queryable<Crm_GroupCustomer>().Where(a => a.IsDel==0 && a.Id==int.Parse(item)).First();
+                        _AirTicketReservations[i].ClientNameStr+=crm_GroupCustomer.Pinyin+',';
+                    }
+                    _AirTicketReservations[i].ClientNameStr=_AirTicketReservations[i].ClientNameStr.Substring(0, _AirTicketReservations[i].ClientNameStr.Length-1);
+                }
                 var data = new
                 {
                     DelegationInfo = _DelegationInfo,
@@ -242,20 +252,24 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
 
                 List<Grp_GroupsTaskAssignment> grp_GroupsTaskAssignment = Query<Grp_GroupsTaskAssignment>(a => a.IsDel == 0 && a.UId == dto.UserId && a.CTId == 85).ToList();
-
+                List<GroupNameView> grp_NameView = new List<GroupNameView>();
                 string DiId = "";
                 foreach (var item in grp_GroupsTaskAssignment)
                 {
                     DiId += item.DIId + ",";
                 }
-                DiId = DiId.Substring(0, DiId.Length - 1);
+                if (DiId.Length>1)
+                {
+                    DiId = DiId.Substring(0, DiId.Length - 1);
+                
                 string sql = string.Format(@"select * from Grp_DelegationInfo where Id in({0}) and IsDel={1}", DiId, 0);
                 List<Grp_DelegationInfo> grp_Delegations = _sqlSugar.SqlQueryable<Grp_DelegationInfo>(sql).ToList();
-                if (grp_Delegations.Count == 0)
+                    
+                    if (grp_Delegations.Count == 0)
                 {
                     return result = new Result() { Code = -1, Msg = "查询失败!" };
                 }
-                List<GroupNameView> grp_NameView = new List<GroupNameView>();
+                
                 foreach (var item in grp_Delegations)
                 {
                     GroupNameView groupNameView = new GroupNameView();
@@ -263,6 +277,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     groupNameView.GroupName = item.TeamName;
                     grp_NameView.Add(groupNameView);
                 }
+                }
                 #endregion
 
                 #region 其他下拉框查询

+ 213 - 21
OASystem/_Doc/OA2023数据字典.docx

@@ -1879,7 +1879,46 @@ Null
 政治审查部门审批文号
 
 
-3) 团组附件表:Grp_DeleFile
+3) 团组英文资料:Grp_DelegationEnData
+                                   字段名
+                                 类型长度
+                                 字段属性
+                                 字段约束
+                                 字段描述
+                                    备注
+Area
+varchar(50)
+Null
+
+区域
+
+Job
+varchar(50)
+Null
+
+职位(中文)
+
+JobEn
+varchar(50)
+Null
+
+职位(英文)
+
+DelegationSetting
+varchar(50)
+Null
+
+背景(中文)
+
+DelegationSettingEn
+varchar(50)
+Null
+
+背景(英文)
+
+
+
+4) 团组附件表:Grp_DeleFile
                                    字段名
                                  类型长度
                                  字段属性
@@ -1888,36 +1927,36 @@ Null
                                     备注
 Diid
 Int
-Nul
+Null
 
 团组Id
 团组表
 Category
 Int
-Nul
+Null
 
 类别标识
 数据类型字表Id
 Kind
 Int
-Nul
+Null
 
 次级类别
 
 FileName
 Varchar(100)
-Nul
+Null
 
 文件名
 
 FilePath
 Varchar(100)
-Nul
+Null
 
 文件路径
 
 
-4) 团组公共需求表:Grp_DeleClientNeeds
+5) 团组公共需求表:Grp_DeleClientNeeds
                                    字段名
                                  类型长度
                                  字段属性
@@ -1985,7 +2024,7 @@ Null
 用餐需求备注
 
 
-5) 团组会议需求表:Grp_DeleMeetingNeeds
+6) 团组会议需求表:Grp_DeleMeetingNeeds
                                    字段名
                                  类型长度
                                  字段属性
@@ -2048,7 +2087,7 @@ Null
 
 
 
-6) 签证进度表:Grp_VisaProgress(挪用)
+7) 签证进度表:Grp_VisaProgress(挪用)
                                    字段名
                                  类型长度
                                  字段属性
@@ -2146,7 +2185,7 @@ Null
 护照接收者
 
 
-7) 机票黑屏代码、询价表:Grp_AirInquiry
+8) 机票黑屏代码、询价表:Grp_AirInquiry
                                    字段名
                                  类型长度
                                  字段属性
@@ -2244,7 +2283,7 @@ Null
 业务人员查询时间
 
 
-8) 暂时没用--机票费用表:Grp_AirPrice(费用录入页面)
+9) 暂时没用--机票费用表:Grp_AirPrice(费用录入页面)
                                    字段名
                                  类型长度
                                  字段属性
@@ -2329,7 +2368,7 @@ Null
 
 报价说明
 
-9) 机票费用录入表:Grp_AirTicketReservations(挪用)
+10) 机票费用录入表:Grp_AirTicketReservations(挪用)
                                    字段名
                                  类型长度
                                  字段属性
@@ -2469,7 +2508,7 @@ Null
 舱类型
 
 
-10) 酒店表:Grp_HotelReservations(挪用)
+11) 酒店表:Grp_HotelReservations(挪用)
                                    字段名
                                  类型长度
                                  字段属性
@@ -2699,7 +2738,7 @@ Null
 是否住了其他房型
 0否1是
 
-11) 付款信息表:Grp_CreditCardPayment(挪用)
+12) 付款信息表:Grp_CreditCardPayment(挪用)
                                    字段名
                                  类型长度
                                  字段属性
@@ -2928,7 +2967,7 @@ Null
 
 超出预算比例
 
-12) 团组流程管控表:Grp_Schedule
+13) 团组流程管控表:Grp_Schedule
                                    字段名
                                  类型长度
                                  字段属性
@@ -2989,7 +3028,7 @@ Null
 
 异常标识
 
-13) 团组流程管控详细进度表:Grp_ScheduleDetail
+14) 团组流程管控详细进度表:Grp_ScheduleDetail
                                    字段名
                                  类型长度
                                  字段属性
@@ -3051,7 +3090,7 @@ Null
 异常标识
 
 
-14) 团组流程管控人员配置表:Grp_SchedulePerson
+15) 团组流程管控人员配置表:Grp_SchedulePerson
                                    字段名
                                  类型长度
                                  字段属性
@@ -3083,7 +3122,7 @@ Null
 负责工作
 
 
-15) 团组任务分配:Grp_GroupsTaskAssignment
+16) 团组任务分配:Grp_GroupsTaskAssignment
                                    字段名
                                  类型长度
                                  字段属性
@@ -3115,7 +3154,7 @@ Null
 启用标识
 0否1是
 
-16) 团组增减款项表:Grp_DecreasePayments
+17) 团组增减款项表:Grp_DecreasePayments
                                    字段名
                                  类型长度
                                  字段属性
@@ -3153,7 +3192,7 @@ Null
 附件地址
 
 
-17) 商邀费用录入表:Grp_InvitationOfficialActivities
+18) 商邀费用录入表:Grp_InvitationOfficialActivities
                                    字段名
                                  类型长度
                                  字段属性
@@ -3214,7 +3253,6 @@ Null
 
 公务标识
 
-
 1. 资源板块
 1) 酒店数据表:Res_HotelData(挪用)
                                    字段名
@@ -3588,6 +3626,160 @@ Null
 传真号码
 
 
+7) 公务出访表:Res_OfficialActivities
+                                   字段名
+                                 类型长度
+                                 字段属性
+                                 字段约束
+                                 字段描述
+                                    备注
+DiId
+int
+Null
+
+团组外键编号
+Grp_DelegationInfo.id
+Type
+int
+Null
+
+邀请方 1  公务方 0 
+
+Client
+varchar(MAX)
+Null
+
+公务单位
+
+Date
+varchar(120)
+Null
+
+公务日期
+
+Time
+varchar(120)
+Null
+
+精确时间
+
+Address
+varchar(MAX)
+Null
+
+地址
+
+Contact
+varchar(120)
+Null
+
+联系人
+
+Job
+varchar(50)
+Null
+
+联系人职务
+
+Tel
+varchar(120)
+Null
+
+联系人电话
+
+OfficialForm
+int
+Null
+
+公务形式
+
+Setting
+varchar(MAX)
+Null
+
+公务方背景
+
+Dresscode
+varchar(120)
+Null
+
+着装要求
+
+Attendees
+varchar(MAX)
+Null
+
+参会人员
+
+IsNeedTrans
+int
+Null
+
+是否需要翻译
+0否1是
+Translators
+nvarchar(255)
+Null
+
+翻译人员
+
+language
+varchar(120)
+Null
+
+翻译语种
+
+Trip
+varchar(MAX)
+Null
+
+暂定行程
+
+
+请示数据库Res_AskData
+                                   字段名
+                                 类型长度
+                                 字段属性
+                                 字段约束
+                                 字段描述
+                                    备注
+DeleName
+varchar(100)
+Null
+
+关联团组
+
+Country
+varchar(100)
+Null
+
+国家
+
+Area
+varchar(500)
+Null
+
+地区
+
+UnitName
+varchar(200)
+Null
+
+公务方名称
+
+Field
+varchar(100)
+Null
+
+涉及领域
+
+TalkCase
+varchar(500)
+Null
+
+话术范例
+
+
 1. 财务板块
 1) 团组成本表:Grp_GroupCostParameter(挪用)
                                    字段名