Переглянути джерело

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

leiy 1 рік тому
батько
коміт
22400cc84e

+ 7 - 2
OASystem/EntitySync/Program.cs

@@ -81,8 +81,13 @@ db.CodeFirst.SetStringDefaultLength(50).BackupTable().InitTables(new Type[]
     //typeof(Sys_Message),
     //typeof(Sys_MessageReadAuth)
     //typeof(Crm_DeleClient)
+    //typeof(Crm_NewClientData)
+
+    typeof(Crm_ClientDataAndUser),
+    typeof(Crm_ClientDataAndBusiness),
     
-    typeof(Res_ItemDetailInfo),
-    typeof(Res_ItemVendor)
+    //typeof(Res_ItemDetailInfo),
+    //typeof(Res_ItemVendor)
+    typeof(Res_CountryFeeCost)
 });
 Console.WriteLine("数据库结构同步完成!");

+ 83 - 49
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -1,8 +1,4 @@
 
-
-using NetTaste;
-using System.Drawing.Printing;
-
 namespace OASystem.API.Controllers
 {
     /// <summary>
@@ -40,45 +36,63 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> QuertCarData(DtoBase dto)
+        public async Task<IActionResult> QueryCarData(QueryCarDataDto dto)
         {
             try
             {
-                if (dto.PortType == 1)
-                {
-                    var carDada = _carDataRep.QueryDto<Res_CarData, CarDataView>().ToList();
-                    if (carDada.Count == 0)
-                    {
-                        return Ok(JsonView(false, "暂无数据!"));
-                    }
-                    carDada = carDada.OrderByDescending(s => s.CreateTime).ToList();
-                    return Ok(JsonView(true, "查询成功", carDada));
-                }
-                else if (dto.PortType == 2)
+                Result LocalGuide = await _carDataRep.QueryCarData(dto);
+                if (LocalGuide.Code == 0)
                 {
-                    var carDada = _carDataRep.QueryDto<Res_CarData, CarDataView>().ToList();
-                    if (carDada.Count == 0)
-                    {
-                        return Ok(JsonView(false, "暂无数据!"));
-                    }
-                    carDada = carDada.OrderByDescending(s => s.CreateTime).ToList();
-                    return Ok(JsonView(true, "查询成功", carDada));
+                    return Ok(JsonView(true, "查询成功", LocalGuide.Data));
                 }
                 else
                 {
-                    return Ok(JsonView(false, "请传入PortType参数!1:Web,2:Android,3:IOS"));
+                    return Ok(JsonView(false, LocalGuide.Msg));
                 }
-
             }
-            catch (Exception ex)
+            catch (Exception)
             {
                 return Ok(JsonView(false, "程序错误!"));
                 throw;
             }
-
-
+           
+            
         }
 
+        /// <summary>
+        /// 车公司资料下拉框数据
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> QueryCarSelect()
+        {
+            try
+            {
+                var CarData = _carDataRep.QueryDto<Res_CarData, CarDataSelectView>().ToList();
+                if (CarData.Count == 0)
+                {
+                    return Ok(JsonView(false, "暂无数据!"));
+                }
+                CarData.Add(new CarDataSelectView { Id = 0, UnitArea = "全部" });
+                CarData = CarData.Where((x, i) => CarData.FindIndex(z => z.UnitArea == x.UnitArea) == i).ToList();
+                CarData = CarData.OrderBy(x => x.Id).ToList();
+                List<CarDataSelectView> data= new List<CarDataSelectView>();
+                foreach (CarDataSelectView car in CarData)
+                {
+                    if (!string.IsNullOrWhiteSpace(car.UnitArea))
+                    {
+                        data.Add(car);
+                    }
+                }
+                return Ok(JsonView(true, "查询成功", data));
+            }
+            catch (Exception)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
         /// <summary>
         /// 车公司信息添加
         /// </summary>
@@ -125,7 +139,7 @@ namespace OASystem.API.Controllers
                 throw;
             }
         }
-
+       
         /// <summary>
         /// 车公司信息修改
         /// </summary>
@@ -215,33 +229,18 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> QueryLocalGuide(DtoBase dto)
+        public async Task<IActionResult> QueryLocalGuide(QueryLocalGuide dto)
         {
             try
             {
-                if (dto.PortType == 1)
-                {
-                    var LocalGuideData = _localGuideDataRep.QueryDto<Res_LocalGuideData, LocalGuideDataView>().ToList();
-                    if (LocalGuideData.Count == 0)
-                    {
-                        return Ok(JsonView(false, "暂无数据!"));
-                    }
-                    LocalGuideData = LocalGuideData.OrderByDescending(s => s.CreateTime).ToList();
-                    return Ok(JsonView(true, "查询成功", LocalGuideData));
-                }
-                else if (dto.PortType == 2)
+                Result LocalGuide = await _localGuideDataRep.QueryLocalGuide(dto);
+                if (LocalGuide.Code == 0)
                 {
-                    var LocalGuideData = _localGuideDataRep.QueryDto<Res_LocalGuideData, LocalGuideDataView>().ToList();
-                    if (LocalGuideData.Count == 0)
-                    {
-                        return Ok(JsonView(false, "暂无数据!"));
-                    }
-                    LocalGuideData = LocalGuideData.OrderByDescending(s => s.CreateTime).ToList();
-                    return Ok(JsonView(true, "查询成功", LocalGuideData));
+                    return Ok(JsonView(true, "查询成功", LocalGuide.Data));
                 }
                 else
                 {
-                    return Ok(JsonView(false, "请传入PortType参数!1:Web,2:Android,3:IOS"));
+                    return Ok(JsonView(false, LocalGuide.Msg));
                 }
 
             }
@@ -254,6 +253,41 @@ namespace OASystem.API.Controllers
 
         }
 
+        /// <summary>
+        /// 导游地接资料下拉框数据
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> QueryLocalGuideSelect()
+        {
+            try
+            {
+                var LocalGuide = _carDataRep.QueryDto<Res_LocalGuideData, QueryLocalGuideSelectView>().ToList();
+                if (LocalGuide.Count == 0)
+                {
+                    return Ok(JsonView(false, "暂无数据!"));
+                }
+                LocalGuide.Add(new QueryLocalGuideSelectView { Id = 0, UnitArea = "全部" });
+                LocalGuide = LocalGuide.Where((x, i) => LocalGuide.FindIndex(z => z.UnitArea == x.UnitArea && z.UnitArea != "") == i).ToList();
+                LocalGuide = LocalGuide.OrderBy(x => x.Id).ToList();
+                List<QueryLocalGuideSelectView> data = new List<QueryLocalGuideSelectView>();
+                foreach (QueryLocalGuideSelectView Local in LocalGuide)
+                {
+                    if (!string.IsNullOrWhiteSpace(Local.UnitArea))
+                    {
+                        data.Add(Local);
+                    }
+                }
+                return Ok(JsonView(true, "查询成功", LocalGuide));
+            }
+            catch (Exception)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+
         /// <summary>
         /// 导游地接信息操作(Status:1.新增,2.修改)
         /// </summary>

+ 3 - 4
OASystem/OASystem.Api/Controllers/SystemController.cs

@@ -1433,7 +1433,7 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> OperationFunInit(OperationFunInitDta dto)
+        public async Task<IActionResult> OperationFun(OperationFunInitDta dto)
         {
             try
             {
@@ -1458,11 +1458,11 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> DelFunInit(DelFunInitDta dto)
+        public async Task<IActionResult> DelFun(DelFunInitDta dto)
         {
             try
             {
-                var res = await _PageFunctionPermissionRepository.SoftDeleteByIdAsync<Res_HotelData>(dto.Id.ToString(), dto.DeleteUserId);
+                var res = await _PageFunctionPermissionRepository.SoftDeleteByIdAsync<Sys_PageFunctionPermission>(dto.Id.ToString(), dto.DeleteUserId);
                 if (!res)
                 {
                     return Ok(JsonView(false, "删除失败"));
@@ -1472,7 +1472,6 @@ namespace OASystem.API.Controllers
             catch (Exception ex)
             {
                 return Ok(JsonView(false, "程序错误!"));
-                throw;
             }
         }
         #endregion

+ 1 - 0
OASystem/OASystem.Domain/AutoMappers/_baseMappingProfile.cs

@@ -71,6 +71,7 @@ namespace OASystem.Domain.AutoMappers
             #region 车公司资料
             CreateMap<Res_CarData, CarDataView>();
             CreateMap<AddCarDataDto, Res_CarData>();
+            CreateMap<Res_CarData, CarDataSelectView>();
             #endregion
             #region 导游地接资料
             CreateMap<Res_LocalGuideData, LocalGuideDataView>();

+ 19 - 0
OASystem/OASystem.Domain/Dtos/Resource/CarDataDto.cs

@@ -7,6 +7,25 @@ using System.Threading.Tasks;
 
 namespace OASystem.Domain.Dtos.Resource
 {
+    public class QueryCarDataDto:DtoBase
+    {
+        /// <summary>
+        /// 单位名称
+        /// </summary>
+        public string UnitName { get; set; }
+        /// <summary>
+        /// 单位区域
+        /// </summary>
+        public string UnitArea { get; set; }
+        /// <summary>
+        /// 联系人
+        /// </summary>
+        public string Contact { get; set; }
+        /// <summary>
+        /// 联系人手机号
+        /// </summary>
+        public string ContactTel { get; set; }
+    }
     /// <summary>
     /// 添加车公司数据参数
     /// </summary>

+ 20 - 0
OASystem/OASystem.Domain/Dtos/Resource/LocalGuideDataDto.cs

@@ -7,6 +7,26 @@ using System.Threading.Tasks;
 
 namespace OASystem.Domain.Dtos.Resource
 {
+    public class QueryLocalGuide:DtoBase
+    {
+        /// <summary>
+        /// 区域
+        /// </summary>
+        public string UnitArea { get; set; }
+        /// <summary>
+        /// 公司名称
+        /// </summary>
+        public string UnitName { get; set; }
+        /// <summary>
+        /// 联系人
+        /// </summary>
+        public string Contact { get; set; }
+
+        /// <summary>
+        /// 联系人手机号
+        /// </summary>
+        public string ContactTel { get; set; }
+    }
     /// <summary>
     /// 地接导游修改添加参数
     /// </summary>

+ 24 - 0
OASystem/OASystem.Domain/Entities/Customer/Crm_ClientDataAndBusiness.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Customer
+{
+    [SugarTable("Crm_ClientDataAndBusiness")]
+    public class Crm_ClientDataAndBusiness:EntityBase
+    {
+        /// <summary>
+        /// setdataid
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int SetDataId { get; set; }
+
+        /// <summary>
+        /// 新客户资源表id
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int NewClientDataId { get; set; }
+    }
+}

+ 24 - 0
OASystem/OASystem.Domain/Entities/Customer/Crm_ClientDataAndUser.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Customer
+{
+    [SugarTable("Crm_ClientDataAndUser")]
+    public class Crm_ClientDataAndUser: EntityBase
+    {
+        /// <summary>
+        /// 用户id
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int usersId { get; set; }
+
+        /// <summary>
+        /// 新客户资源表id
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int NewClientDataId { get; set; }
+    }
+}

+ 165 - 0
OASystem/OASystem.Domain/Entities/Customer/Crm_NewClientData.cs

@@ -0,0 +1,165 @@
+using Org.BouncyCastle.Asn1.Ocsp;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using static Google.Protobuf.Reflection.SourceCodeInfo.Types;
+
+namespace OASystem.Domain.Entities.Customer
+{
+    /// <summary>
+    /// 新客户资料表
+    /// </summary>
+    [SugarTable("Crm_NewClientData")]
+    public class Crm_NewClientData : EntityBase
+    {
+        private int number;
+        private int lvlid;
+        private string client;
+        private string weight;
+        private string clientshort;
+        private string contact;
+        private int gender;
+        private string passport;
+        private DateTime? passportDate;
+        private string job;
+        private string telephone;
+        private string phone;
+        private string email;
+        private string location;
+        private string address;
+        private DateTime? birthday;
+        private string otherinfo;
+        private string wechat;
+        private int category;
+        private int predele;
+        private int finlishedDele;
+
+        /// <summary>
+        /// 序号
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int Number { get => number; set => number = value; }
+
+        /// <summary>
+        /// 地市州Id
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int Lvlid { get => lvlid; set => lvlid = value; }
+
+        /// <summary>
+        /// 客户单位
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Client { get => client; set => client = value; }
+
+        /// <summary>
+        /// 权重
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(20)")]
+        public string Weight { get => weight; set => weight = value; }
+
+        /// <summary>
+        /// 客户单位简写
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Clientshort { get => clientshort; set => clientshort = value; }
+
+        /// <summary>
+        /// 联系人
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Contact { get => contact; set => contact = value; }
+
+        /// <summary>
+        /// 联系人性别
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int Gender { get => gender; set => gender = value; }
+
+        /// <summary>
+        /// 护照
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Passport { get => passport; set => passport = value; }
+
+        /// <summary>
+        /// 护照日期
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "DateTime")]
+        public DateTime? PassportDate { get => passportDate; set => passportDate = value; }
+
+        /// <summary>
+        /// 职位
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Job { get => job; set => job = value; }
+
+        /// <summary>
+        /// 联系手机号
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Telephone { get => telephone; set => telephone = value; }
+
+        /// <summary>
+        /// 联系座机号
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Phone { get => phone; set => phone = value; }
+
+        /// <summary>
+        /// 邮件
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Email { get => email; set => email = value; }
+
+        /// <summary>
+        /// 所属区域(所在城市)
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Location { get => location; set => location = value; }
+
+        /// <summary>
+        /// 地址
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(80)")]
+        public string Address { get => address; set => address = value; }
+
+        /// <summary>
+        /// 生日
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "Date")]
+        public DateTime? Birthday { get => birthday; set => birthday = value; }
+
+        /// <summary>
+        /// 其他信息
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        public string Otherinfo { get => otherinfo; set => otherinfo = value; }
+
+        /// <summary>
+        /// 微信
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string Wechat { get => wechat; set => wechat = value; }
+
+        /// <summary>
+        /// 分类
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int Category { get => category; set => category = value; }
+
+        /// <summary>
+        /// 预计出团
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int Predele { get => predele; set => predele = value; }
+
+        /// <summary>
+        /// 已出团
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int FinlishedDele { get => finlishedDele; set => finlishedDele = value; }
+    }
+}

+ 95 - 0
OASystem/OASystem.Domain/Entities/Resource/Res_CountryFeeCost.cs

@@ -0,0 +1,95 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Resource
+{
+    [SugarTable("Res_CountryFeeCost")]
+    public class Res_CountryFeeCost:EntityBase
+    {
+        /// <summary>
+        /// 洲名
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string VisaContinent { get; set; }
+
+        /// <summary>
+        /// 国家名
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string VisaCountry { get; set; }
+
+        /// <summary>
+        /// 是否免签免签 0:是 1:否
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int IsVisaExemption { get; set; }
+        /// <summary>
+        /// 是否落地签 0:是 1:否
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int IsVisaOnArrival { get; set; }
+        /// <summary>
+        /// 是否电子签 0:是 1:否
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int IsElectronicSignature { get; set; }
+
+        /// <summary>
+        /// 签证费用
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        public decimal VisaPrice { get; set; }
+
+        /// <summary>
+        /// 签证费用描述
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "nvarchar(255)")]
+        public string VisaPriceDesc { get; set; }
+
+        /// <summary>
+        /// 签证类型 大公务/小公务/大小公务同时免签
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string VisaType { get; set; }
+
+        /// <summary>
+        /// 一般签证时间
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(20)")]
+        public DateTime VisaTime { get; set; }
+
+        /// <summary>
+        /// 签证是否加急 0:加急  1: 不加急
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int IsUrgent { get; set; }
+
+        /// <summary>
+        /// 加急时间 
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(20)")]
+        public DateTime UrgentTime { get; set; }
+
+        /// <summary>
+        /// 加急费用
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        public decimal UrgentPrice { get; set; }
+
+        /// <summary>
+        /// 加急费用描述 
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "nvarchar(255)")]
+        public string UrgentPriceDesc { get; set; }
+
+        /// <summary>
+        /// 签证地址
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string VisaAddress { get; set; }
+
+    }
+}

+ 6 - 0
OASystem/OASystem.Domain/ViewModels/Resource/CarDataView.cs

@@ -10,4 +10,10 @@ namespace OASystem.Domain.ViewModels.Resource
     public class CarDataView:Res_CarData
     {
     }
+
+    public class CarDataSelectView
+    {
+        public int Id { get; set; }
+        public string UnitArea { get; set; }
+    }
 }

+ 5 - 0
OASystem/OASystem.Domain/ViewModels/Resource/LocalGuideDataView.cs

@@ -10,4 +10,9 @@ namespace OASystem.Domain.ViewModels.Resource
     public class LocalGuideDataView:Res_LocalGuideData
     {
     }
+    public class QueryLocalGuideSelectView
+    {
+        public int Id { get; set; }
+        public string UnitArea { get; set; }
+    }
 }

+ 147 - 2
OASystem/OASystem.Infrastructure/Repositories/Resource/CarDataRepository.cs

@@ -1,12 +1,157 @@
-using OASystem.Domain.Entities.Resource;
+using AutoMapper;
+using OASystem.Domain;
+using OASystem.Domain.Dtos.Resource;
+using OASystem.Domain.Entities.Resource;
 using OASystem.Domain.ViewModels.Resource;
+
 namespace OASystem.Infrastructure.Repositories.Resource
 {
     public class CarDataRepository: BaseRepository<Res_CarData, CarDataView>
     {
-        public CarDataRepository(SqlSugarClient sqlSugar) : base(sqlSugar)
+        private readonly IMapper _mapper;
+        public CarDataRepository(SqlSugarClient sqlSugar, IMapper mapper) : base(sqlSugar)
+        {
+            _mapper = mapper;
+        }
+
+        /// <summary>
+        /// 查询用车资料
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        public async Task<Result> QueryCarData(QueryCarDataDto dto)
         {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+            try
+            {
+                string sqlWhere = string.Empty;
+                if (!string.IsNullOrWhiteSpace(dto.UnitName))
+                {
+                    sqlWhere += string.Format(@" And UnitName like '%{0}%'", dto.UnitName);
+                }
+                if (!string.IsNullOrWhiteSpace(dto.UnitArea) && dto.UnitArea!="全部")
+                {
+                    sqlWhere += string.Format(@" And UnitArea like '%{0}%'", dto.UnitArea);
+                }
+                if (!string.IsNullOrWhiteSpace(dto.Contact))
+                {
+                    sqlWhere += string.Format(@" And Contact like '%{0}%'", dto.Contact);
+                }
+                if (!string.IsNullOrWhiteSpace(dto.ContactTel))
+                {
+                    sqlWhere += string.Format(@" And ContactTel like '%{0}%'", dto.ContactTel);
+                }
+                if (!string.IsNullOrEmpty(sqlWhere.Trim()))
+                {
+                    Regex r = new Regex("And");
+                    sqlWhere = r.Replace(sqlWhere, "Where", 1);
+                }
+                if (dto.PortType == 1)
+                {
+                    string sql = string.Format(@"select * from Res_CarData {0}", sqlWhere);
+                    List<Res_CarData> CarData = await _sqlSugar.SqlQueryable<Res_CarData>(sql).ToListAsync();
+                    if (CarData.Count==0)
+                    {
+                        return result = new Result() { Code = -1, Msg = "暂无数据" };
+                    }
+                    CarData= CarData.OrderByDescending(x => x.CreateTime).ToList();
+
+                    if (dto.PageSize==0 || dto.PageIndex==0)
+                    {
+                        return result = new Result()
+                        {
+                            Code = 0,
+                            Msg = "查询成功",
+                            Data = CarData,
+                        };
+                    }
+                    else
+                    {
+                        int count = CarData.Count;
+                        float totalPage = (float)count / dto.PageSize;//总页数
+                        if (totalPage == 0) totalPage = 1;
+                        else totalPage = (int)Math.Ceiling((double)totalPage);
+
+                        List<Res_CarData> ListData = new List<Res_CarData>();
+                        for (int i = 0; i < dto.PageSize; i++)
+                        {
+                            var RowIndex = i + (dto.PageIndex - 1) * dto.PageSize;
+                            if (RowIndex < CarData.Count)
+                            {
+                                ListData.Add(CarData[RowIndex]);
+                            }
+                            else
+                            {
+                                break;
+                            }
+                        }
+                        return result = new Result()
+                        {
+                            Code = 0,
+                            Msg = "查询成功",
+                            Data = new { pageCount = count, totalPage = (int)totalPage, pageIndex = dto.PageIndex, pageSize = dto.PageSize, pageSource = ListData },
+                        };
+                    }
+                    
+                }
+                else if (dto.PortType == 2)
+                {
+                    string sql = string.Format(@"select * from Res_CarData {0}", sqlWhere);
+                    List<Res_CarData> CarData = await _sqlSugar.SqlQueryable<Res_CarData>(sql).ToListAsync();
+                    if (CarData.Count == 0)
+                    {
+                        return result = new Result() { Code = -1, Msg = "暂无数据" };
+                    }
+                    CarData = CarData.OrderByDescending(x => x.CreateTime).ToList();
+
+                    if (dto.PageSize == 0 || dto.PageIndex == 0)
+                    {
+                        return result = new Result()
+                        {
+                            Code = 0,
+                            Msg = "查询成功",
+                            Data = CarData,
+                        };
+                    }
+                    else
+                    {
+                        int count = CarData.Count;
+                        float totalPage = (float)count / dto.PageSize;//总页数
+                        if (totalPage == 0) totalPage = 1;
+                        else totalPage = (int)Math.Ceiling((double)totalPage);
 
+                        List<Res_CarData> ListData = new List<Res_CarData>();
+                        for (int i = 0; i < dto.PageSize; i++)
+                        {
+                            var RowIndex = i + (dto.PageIndex - 1) * dto.PageSize;
+                            if (RowIndex < CarData.Count)
+                            {
+                                ListData.Add(CarData[RowIndex]);
+                            }
+                            else
+                            {
+                                break;
+                            }
+                        }
+                        return result = new Result()
+                        {
+                            Code = 0,
+                            Msg = "查询成功",
+                            Data = new { pageCount = count, totalPage = ((int)totalPage).ToString(), pageIndex = dto.PageIndex, pageSize = dto.PageSize, pageSource = ListData },
+                        };
+                    }
+                }
+                else
+                {
+                    return result = new Result() { Code = -2, Msg = "请传入PortType参数!1:Web,2:Android,3:IOS" };
+                }
+            }
+            catch (Exception)
+            {
+                return result;
+                throw;
+            }
+            
         }
     }
 }

+ 135 - 0
OASystem/OASystem.Infrastructure/Repositories/Resource/LocalGuideDataRepository.cs

@@ -85,5 +85,140 @@ namespace OASystem.Infrastructure.Repositories.Resource
             }
             return result;
         }
+
+        public async Task<Result> QueryLocalGuide(QueryLocalGuide dto)
+        {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+            try
+            {
+                string sqlWhere = string.Empty;
+                if (!string.IsNullOrWhiteSpace(dto.UnitName))
+                {
+                    sqlWhere += string.Format(@" And UnitName like '%{0}%'", dto.UnitName);
+                }
+                if (!string.IsNullOrWhiteSpace(dto.UnitArea) && dto.UnitArea != "全部")
+                {
+                    sqlWhere += string.Format(@" And UnitArea like '%{0}%''", dto.UnitArea);
+                }
+                if (!string.IsNullOrWhiteSpace(dto.Contact))
+                {
+                    sqlWhere += string.Format(@" And Contact like '%{0}%'", dto.Contact);
+                }
+                if (!string.IsNullOrWhiteSpace(dto.ContactTel))
+                {
+                    sqlWhere += string.Format(@" And ContactTel like '%{0}%'", dto.ContactTel);
+                }
+                if (!string.IsNullOrEmpty(sqlWhere.Trim()))
+                {
+                    Regex r = new Regex("And");
+                    sqlWhere = r.Replace(sqlWhere, "Where", 1);
+                }
+                if (dto.PortType == 1)
+                {
+                    string sql = string.Format(@"select * from Res_LocalGuideData {0}", sqlWhere);
+                    List<Res_LocalGuideData> LocalGuideData = await _sqlSugar.SqlQueryable<Res_LocalGuideData>(sql).ToListAsync();
+                    if (LocalGuideData.Count == 0)
+                    {
+                        return result = new Result() { Code = -1, Msg = "暂无数据" };
+                    }
+                    LocalGuideData = LocalGuideData.OrderByDescending(x => x.CreateTime).ToList();
+
+                    if (dto.PageSize == 0 || dto.PageIndex == 0)
+                    {
+                        return result = new Result()
+                        {
+                            Code = 0,
+                            Msg = "查询成功",
+                            Data = LocalGuideData,
+                        };
+                    }
+                    else
+                    {
+                        int count = LocalGuideData.Count;
+                        float totalPage = (float)count / dto.PageSize;//总页数
+                        if (totalPage == 0) totalPage = 1;
+                        else totalPage = (int)Math.Ceiling((double)totalPage);
+
+                        List<Res_LocalGuideData> ListData = new List<Res_LocalGuideData>();
+                        for (int i = 0; i < dto.PageSize; i++)
+                        {
+                            var RowIndex = i + (dto.PageIndex - 1) * dto.PageSize;
+                            if (RowIndex < LocalGuideData.Count)
+                            {
+                                ListData.Add(LocalGuideData[RowIndex]);
+                            }
+                            else
+                            {
+                                break;
+                            }
+                        }
+                        return result = new Result()
+                        {
+                            Code = 0,
+                            Msg = "查询成功",
+                            Data = new { pageCount = count, totalPage = (int)totalPage, pageIndex = dto.PageIndex, pageSize = dto.PageSize, pageSource = ListData },
+                        };
+                    }
+
+                }
+                else if (dto.PortType == 2)
+                {
+                    string sql = string.Format(@"select * from Res_LocalGuideData {0}", sqlWhere);
+                    List<Res_LocalGuideData> LocalGuideData = await _sqlSugar.SqlQueryable<Res_LocalGuideData>(sql).ToListAsync();
+                    if (LocalGuideData.Count == 0)
+                    {
+                        return result = new Result() { Code = -1, Msg = "暂无数据" };
+                    }
+                    LocalGuideData = LocalGuideData.OrderByDescending(x => x.CreateTime).ToList();
+
+                    if (dto.PageSize == 0 || dto.PageIndex == 0)
+                    {
+                        return result = new Result()
+                        {
+                            Code = 0,
+                            Msg = "查询成功",
+                            Data = LocalGuideData,
+                        };
+                    }
+                    else
+                    {
+                        int count = LocalGuideData.Count;
+                        float totalPage = (float)count / dto.PageSize;//总页数
+                        if (totalPage == 0) totalPage = 1;
+                        else totalPage = (int)Math.Ceiling((double)totalPage);
+
+                        List<Res_LocalGuideData> ListData = new List<Res_LocalGuideData>();
+                        for (int i = 0; i < dto.PageSize; i++)
+                        {
+                            var RowIndex = i + (dto.PageIndex - 1) * dto.PageSize;
+                            if (RowIndex < LocalGuideData.Count)
+                            {
+                                ListData.Add(LocalGuideData[RowIndex]);
+                            }
+                            else
+                            {
+                                break;
+                            }
+                        }
+                        return result = new Result()
+                        {
+                            Code = 0,
+                            Msg = "查询成功",
+                            Data = new { pageCount = count, totalPage = (int)totalPage, pageIndex = dto.PageIndex, pageSize = dto.PageSize, pageSource = ListData },
+                        };
+                    }
+                }
+                else
+                {
+                    return result = new Result() { Code = -2, Msg = "请传入PortType参数!1:Web,2:Android,3:IOS" };
+                }
+            }
+            catch (Exception)
+            {
+                return result;
+                throw;
+            }
+
+        }
     }
 }

+ 228 - 0
OASystem/_Doc/OA2023数据字典.docx

@@ -1432,6 +1432,142 @@ Null
 0否1是
 
 
+8) 新客户资料信息表:Crm_NewClientData
+
+                                   字段名
+                                 类型长度
+                                 字段属性
+                                 字段约束
+                                 字段描述
+                                    备注
+number
+Int
+Null
+
+序号
+
+lvlId
+Int
+Null
+
+地市州id
+
+client
+varchar(50)
+Null
+
+客户单位
+
+weight
+varchar(20)
+
+
+权重
+
+clientshort
+varchar(50)
+
+
+客户单位简写
+
+contact
+varchar(50)
+
+
+联系人
+
+gender 
+int
+
+
+联系人性别
+0男1女
+passport
+varchar(50)
+
+
+护照
+
+passportDate
+DateTime
+
+
+护照日期
+
+job
+varchar(50)
+
+
+职位
+
+telephone
+varchar(50)
+
+
+联系手机号
+
+phone
+varchar(50)
+
+
+联系座机号
+
+email
+varchar(50)
+
+
+ 邮件
+
+location
+varchar(50)
+
+
+所属区域(所在城市)
+
+address
+varchar(80)
+
+
+地址
+
+birthday
+Date
+
+
+生日
+
+otherinfo
+varchar(50)
+
+
+其他信息
+
+wechat
+varchar(50)
+
+
+微信
+
+category
+int
+
+
+分类
+setdataid
+predele
+int
+
+
+预计出团
+
+finlishedDele
+int
+
+
+已出团
+
+
+
 1. 团组模块
 
 
@@ -2927,3 +3063,95 @@ Null
 机场英文名
 
 
+5) 国家_签证费用标准表:Res_CountryFeeCost(挪用)
+                                   字段名
+                                 类型长度
+                                 字段属性
+                                 字段约束
+                                 字段描述
+                                    备注
+VisaContinent
+varchar(50)
+Null
+
+洲名
+
+VisaCountry
+varchar(50)
+Null
+
+国家名
+
+IsVisaExemption
+int
+Null
+
+是否免签免签
+0:是 1:否
+IsVisaOnArrival
+int
+Null
+
+是否落地签
+0:是 1:否
+IsElectronicSignature
+int
+Null
+
+是否电子签
+0:是 1:否
+VisaPrice
+decimal(10, 2)
+Null
+
+签证费用
+
+VisaPriceDesc
+nvarchar(255)
+Null
+
+签证费用描述
+
+VisaType
+varchar(50)
+Null
+
+签证类型
+大公务/小公务/大小公务同时免签
+VisaTime
+varchar(50)
+Null
+
+一般签证时间
+
+IsUrgent
+int
+Null
+
+签证是否加急
+0:加急  1: 不加急
+UrgentTime
+varchar(50)
+Null
+
+加急时间 
+
+UrgentPrice
+decimal(10, 2)
+Null
+
+加急费用
+
+UrgentPriceDesc
+nvarchar(255)
+Null
+
+加急费用描述 
+
+VisaAddress
+nvarchar(255)
+Null
+
+签证地址
+
+