Browse Source

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

leiy 1 year ago
parent
commit
2cb3ade509

+ 2 - 0
OASystem/EntitySync/Program.cs

@@ -100,5 +100,7 @@ db.CodeFirst.SetStringDefaultLength(50).BackupTable().InitTables(new Type[]
     //typeof(Fin_ProceedsReceived),      // 已收款项
     //typeof(Fin_ProceedsReceived),      // 已收款项
     //typeof(Fin_OtherPrice),            // 其他款项
     //typeof(Fin_OtherPrice),            // 其他款项
     //typeof(Res_OfficialActivities)     //公务出访
     //typeof(Res_OfficialActivities)     //公务出访
+    //typeof(Res_AskData),//请示数据库
+    //typeof(Grp_DelegationEnData)
 });
 });
 Console.WriteLine("数据库结构同步完成!");
 Console.WriteLine("数据库结构同步完成!");

+ 77 - 2
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -36,12 +36,13 @@ namespace OASystem.API.Controllers
         private readonly AirTicketResRepository _airTicketResRep;
         private readonly AirTicketResRepository _airTicketResRep;
         private readonly DecreasePaymentsRepository _decreasePaymentsRep;
         private readonly DecreasePaymentsRepository _decreasePaymentsRep;
         private readonly InvitationOfficialActivitiesRepository _InvitationOfficialActivitiesRep;
         private readonly InvitationOfficialActivitiesRepository _InvitationOfficialActivitiesRep;
+        private readonly DelegationEnDataRepository _delegationEnDataRep;
         private readonly SqlSugarClient _sqlSugar;
         private readonly SqlSugarClient _sqlSugar;
         private string url;
         private string url;
         private string path;
         private string path;
         public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
         public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
             TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
             TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
-            InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep)
+            InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, DelegationEnDataRepository delegationEnDataRep)
         {
         {
             _mapper = mapper;
             _mapper = mapper;
             _grpScheduleRep = grpScheduleRep;
             _grpScheduleRep = grpScheduleRep;
@@ -57,6 +58,7 @@ namespace OASystem.API.Controllers
             }
             }
             _decreasePaymentsRep = decreasePaymentsRep;
             _decreasePaymentsRep = decreasePaymentsRep;
             _InvitationOfficialActivitiesRep = InvitationOfficialActivitiesRep;
             _InvitationOfficialActivitiesRep = InvitationOfficialActivitiesRep;
+            _delegationEnDataRep = delegationEnDataRep;
         }
         }
 
 
         #region 流程管控
         #region 流程管控
@@ -1847,6 +1849,79 @@ namespace OASystem.API.Controllers
 
 
         #endregion
         #endregion
 
 
-
+        #region 团组英文资料
+        /// <summary>
+        /// 查询团组英文所有资料
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> QueryDelegationEnData(QueryDelegationEnDataDto dto)
+        {
+            try
+            {
+                List<Grp_DelegationEnData> grp_DelegationEns = await _sqlSugar.Queryable<Grp_DelegationEnData>().Where(a => a.IsDel == 0 && a.Area==dto.Area && a.Job==dto.Job).ToListAsync();
+                if (grp_DelegationEns.Count == 0)
+                {
+                    return Ok(JsonView(true, "暂无数据!", grp_DelegationEns));
+                }
+                return Ok(JsonView(true, "查询成功!", grp_DelegationEns));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+        /// <summary>
+        /// 团组英文资料操作(Status:1.新增,2.修改)
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> OpDelegationEnData(OpDelegationEnDataDto dto)
+        {
+            try
+            {
+                Result groupData = await _delegationEnDataRep.OpDelegationEnData(dto);
+                if (groupData.Code != 0)
+                {
+                    return Ok(JsonView(false, groupData.Msg));
+                }
+                return Ok(JsonView(true, groupData.Msg, groupData.Data));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+        /// <summary>
+        /// 团组英文资料删除
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> DelDelegationEnData(DelBaseDto dto)
+        {
+            try
+            {
+                var res = await _delegationEnDataRep.SoftDeleteByIdAsync<Grp_DelegationEnData>(dto.Id.ToString(), dto.DeleteUserId);
+                if (!res)
+                {
+                    return Ok(JsonView(false, "删除失败"));
+                }
+                return Ok(JsonView(true, "删除成功!"));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+        #endregion
     }
     }
 }
 }

+ 204 - 5
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -1,8 +1,12 @@
-using OASystem.API.OAMethodLib;
+using NPOI.HPSF;
+using OASystem.API.OAMethodLib;
 using OASystem.Domain.Dtos.Resource;
 using OASystem.Domain.Dtos.Resource;
 using OASystem.Domain.Entities.Groups;
 using OASystem.Domain.Entities.Groups;
 using OASystem.Infrastructure.Repositories.Groups;
 using OASystem.Infrastructure.Repositories.Groups;
+using Org.BouncyCastle.Utilities;
+using Quartz.Util;
 using System.Collections.Generic;
 using System.Collections.Generic;
+using System.Net.Http.Headers;
 
 
 namespace OASystem.API.Controllers
 namespace OASystem.API.Controllers
 {
 {
@@ -26,13 +30,14 @@ namespace OASystem.API.Controllers
         private readonly AirTicketAgentRepository _airTicketAgentRep;
         private readonly AirTicketAgentRepository _airTicketAgentRep;
         private readonly InvitationOfficialActivityDataRepository _InvitationOfficialActivityDataRep;
         private readonly InvitationOfficialActivityDataRepository _InvitationOfficialActivityDataRep;
         private readonly OfficialActivitiesRepository _officialActivitiesRep;
         private readonly OfficialActivitiesRepository _officialActivitiesRep;
+        private readonly AskDataRepository _askDataRep;
         private readonly SqlSugarClient _sqlSugar;
         private readonly SqlSugarClient _sqlSugar;
 
 
         public ResourceController(IMapper mapper, IConfiguration config, SqlSugarClient sqlSugar, CarDataRepository carDataRep,
         public ResourceController(IMapper mapper, IConfiguration config, SqlSugarClient sqlSugar, CarDataRepository carDataRep,
             LocalGuideDataRepository localGuideDataRep, ThreeCodeRepository threeCodeRep,
             LocalGuideDataRepository localGuideDataRep, ThreeCodeRepository threeCodeRep,
             HotelDataRepository hotelDataRep, ResItemInfoRepository resItemInfoRep, SetDataRepository setDataRepository,
             HotelDataRepository hotelDataRep, ResItemInfoRepository resItemInfoRep, SetDataRepository setDataRepository,
             CountryFeeRepository countryFeeRep, SetDataTypeRepository setDataTypeRep, AirTicketAgentRepository airTicketAgentRep,
             CountryFeeRepository countryFeeRep, SetDataTypeRepository setDataTypeRep, AirTicketAgentRepository airTicketAgentRep,
-            InvitationOfficialActivityDataRepository invitationOfficialActivityDataRep, OfficialActivitiesRepository officialActivitiesRep)
+            InvitationOfficialActivityDataRepository invitationOfficialActivityDataRep, OfficialActivitiesRepository officialActivitiesRep, AskDataRepository askDataRep)
         {
         {
             _mapper = mapper;
             _mapper = mapper;
             _config = config;
             _config = config;
@@ -48,6 +53,7 @@ namespace OASystem.API.Controllers
             _airTicketAgentRep = airTicketAgentRep;
             _airTicketAgentRep = airTicketAgentRep;
             _InvitationOfficialActivityDataRep = invitationOfficialActivityDataRep;
             _InvitationOfficialActivityDataRep = invitationOfficialActivityDataRep;
             _officialActivitiesRep = officialActivitiesRep;
             _officialActivitiesRep = officialActivitiesRep;
+            _askDataRep = askDataRep;
         }
         }
 
 
 
 
@@ -1538,7 +1544,11 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
                 throw;
                 throw;
             }
             }
         }
         }
-
+        /// <summary>
+        /// 上传文件
+        /// </summary>
+        /// <param name="file"></param>
+        /// <returns></returns>
         [HttpPost]
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> UploadOfficialActivities(IFormFile file)
         public async Task<IActionResult> UploadOfficialActivities(IFormFile file)
@@ -1591,7 +1601,11 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
                 throw;
                 throw;
             }
             }
         }
         }
-
+        /// <summary>
+        /// 删除文件
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
         [HttpPost]
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> DelloadOfficialActivities(DelBaseDto dto)
         public async Task<IActionResult> DelloadOfficialActivities(DelBaseDto dto)
@@ -1621,9 +1635,194 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
                 throw;
                 throw;
             }
             }
         }
         }
+
+        /// <summary>
+        /// 删除公务出访信息
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> DelOfficialActivities(DelBaseDto dto)
+        {
+            try
+            {
+                var res = await _officialActivitiesRep.SoftDeleteByIdAsync<Res_OfficialActivities>(dto.Id.ToString(), dto.DeleteUserId);
+                if (!res)
+                {
+                    return Ok(JsonView(false, "删除失败"));
+                }
+                return Ok(JsonView(true, "删除成功!"));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+        #endregion
+
+        #region 请示数据库
+        /// <summary>
+        /// 查询请示数据库初始化
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> QueryAskData(QueryAskDataDto dto)
+        {
+            try
+            {
+                Result groupData = await _askDataRep.QueryAskData(dto);
+                if (groupData.Code != 0)
+                {
+                    return Ok(JsonView(false, groupData.Msg));
+                }
+                return Ok(JsonView(true, groupData.Msg, groupData.Data));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+
+        /// <summary>
+        /// 根据Id查询请示数据库单挑数据
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> QueryAskDataById(QueryAskDataByIdDto dto)
+        {
+            try
+            {
+                Res_AskData _AskData = await _sqlSugar.Queryable<Res_AskData>().FirstAsync(a => a.IsDel == 0 && a.Id == dto.id);
+                if (_AskData==null)
+                {
+                    return Ok(JsonView(true, "暂无数据!", _AskData));
+                }
+                return Ok(JsonView(true, "查询成功!", _AskData));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+        /// <summary>
+        /// 请示数据库操作(Status:1.新增,2.修改)
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> OpAskData(OpAskDataDto dto)
+        {
+            try
+            {
+                Result groupData = await _askDataRep.OpAskData(dto);
+                if (groupData.Code != 0)
+                {
+                    return Ok(JsonView(false, groupData.Msg));
+                }
+                return Ok(JsonView(true, groupData.Msg, groupData.Data));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+        /// <summary>
+        /// 删除请示资料信息
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> DelAskData(DelBaseDto dto)
+        {
+            try
+            {
+                var res = await _askDataRep.SoftDeleteByIdAsync<Res_AskData>(dto.Id.ToString(), dto.DeleteUserId);
+                if (!res)
+                {
+                    return Ok(JsonView(false, "删除失败"));
+                }
+                return Ok(JsonView(true, "删除成功!"));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+
+
+        /// <summary>
+        /// 导出省外办请示
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> AskAdviceDerive(AskAdviceDerive dto)
+        {
+            try
+            {
+                string Air = "";//机票信息
+                string Area = "";//城市
+                string Area2 = "";//城市
+                string ClientName = "";//人员
+                string ClientName2 = "";//人员
+                int ClientNumber =0;//总人数
+                string Content = "";//行程安排
+                string CountryAndDay = "";//各个国家待的天数
+                string Destination = "";//此行目的
+                string Destination2 = "";//此行目的
+                string Duration = "";//出访时间
+                int Durationdays = 0;//出访天数
+                int Durationdays2 =0;//出访天数
+                string Official = "";//对谁的邀请
+                string Temp = "";//出访任务
+                string VisitDate = "";//出访日期,多少号到多少号
+
+
+                return Ok(JsonView(true, "导出成功!"));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+
+        /// <summary>
+        /// 导出市外办请示
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> AskCityDerive(AskAdviceDerive dto)
+        {
+            try
+            {
+              
+                return Ok(JsonView(true, "导出成功!"));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
         #endregion
         #endregion
     }
     }
-   
+
 
 
 }
 }
 
 

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

@@ -92,7 +92,9 @@ namespace OASystem.Domain.AutoMappers
             CreateMap<OpInvitationOfficialActivitiesDto, Grp_InvitationOfficialActivities>();
             CreateMap<OpInvitationOfficialActivitiesDto, Grp_InvitationOfficialActivities>();
             CreateMap<OpInvitationOfficialActivitiesDto,Res_InvitationOfficialActivityData>();
             CreateMap<OpInvitationOfficialActivitiesDto,Res_InvitationOfficialActivityData>();
             #endregion
             #endregion
-
+            #region 团组英文资料
+            CreateMap<OpDelegationEnDataDto, Grp_DelegationEnData>();
+            #endregion
             #endregion
             #endregion
 
 
             #region Resource
             #region Resource
@@ -145,6 +147,9 @@ namespace OASystem.Domain.AutoMappers
             #region 公务出访
             #region 公务出访
             CreateMap<OpOfficialActivitiesDto, Res_OfficialActivities>();
             CreateMap<OpOfficialActivitiesDto, Res_OfficialActivities>();
             #endregion
             #endregion
+            #region 请示数据库
+            CreateMap<OpAskDataDto, Res_AskData>();
+            #endregion
             #endregion
             #endregion
 
 
             #region Crm
             #region Crm

+ 20 - 3
OASystem/OASystem.Domain/Dtos/DtoBase.cs

@@ -48,9 +48,26 @@ namespace OASystem.Domain.Dtos
         /// </summary>
         /// </summary>
         public int DeleteUserId { get; set; }
         public int DeleteUserId { get; set; }
     }
     }
-    public class DataDto
+
+    public class OpBaseDto
     {
     {
-        public IFormFile file { get; set; }
-        public string typeName { get; set; }
+        /// <summary>
+        /// 操作状态
+        /// 1 添加 
+        /// 2 修改 
+        /// </summary>
+        public int Status { get; set; }
+        /// <summary>
+        /// 编号
+        /// </summary>
+        public int Id { get; set; }
+        /// <summary>
+        /// 创建者Id
+        /// </summary>
+        public int CreateUserId { get; set; }
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark { get; set; }
     }
     }
 }
 }

+ 63 - 0
OASystem/OASystem.Domain/Dtos/Groups/QueryDelegationEnDataDto.cs

@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.Groups
+{
+    /// <summary>
+    /// 查询
+    /// </summary>
+    public class QueryDelegationEnDataDto
+    {
+        /// <summary>
+        ///  区域
+        /// </summary>
+        public string Area { get; set; }
+
+        /// <summary>
+        ///  职务
+        /// </summary>
+        public string Job { get; set; }
+    }
+    /// <summary>
+    /// 团组英文资料操作
+    /// </summary>
+    public class OpDelegationEnDataDto:OpBaseDto
+    {
+        /// <summary>
+        ///  区域
+        /// </summary>
+        public string Area { get; set; }
+
+        /// <summary>
+        ///  职务
+        /// </summary>
+        public string Job { get; set; }
+
+        /// <summary>
+        ///  职务英文
+        /// </summary>
+        public string JobEn { get; set; }
+
+        /// <summary>
+        ///  背景
+        /// </summary>
+        public string DelegationSetting { get; set; }
+
+        /// <summary>
+        ///  背景英文
+        /// </summary>
+        public string DelegationSettingEn { get; set; }
+    }
+
+    public class TranslationOneKeyDto 
+    {
+        /// <summary>
+        /// 待翻译的文本
+        /// </summary>
+        public string? TranslationOneKeyStr { get; set; }
+
+    }
+}

+ 78 - 0
OASystem/OASystem.Domain/Dtos/Resource/QueryAskDataDto.cs

@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.Resource
+{
+    public class QueryAskDataDto
+    {
+        /// <summary>
+        /// 国家
+        /// </summary>
+        public string Country { get; set; }
+        /// <summary>
+        /// 地区
+        /// </summary>
+        public string Area { get; set; }
+        /// <summary>
+        /// 涉及领域
+        /// </summary>
+        public string Field { get; set; }
+    }
+    public class QueryAskDataByIdDto
+    {
+        public int id { get; set; }
+    }
+    public class OpAskDataDto
+    {
+        /// <summary>
+        /// 操作状态
+        /// 1 添加 
+        /// 2 修改 
+        /// </summary>
+        public int Status { get; set; }
+        /// <summary>
+        /// 编号
+        /// </summary>
+        public int Id { get; set; }
+        /// <summary>
+        /// 国家
+        /// </summary>
+        public string Country { get; set; }
+        /// <summary>
+        /// 地区
+        /// </summary>
+        public string Area { get; set; }
+        /// <summary>
+        /// 公务方名称
+        /// </summary>
+        public string UnitName { get; set; }
+        /// <summary>
+        /// 涉及领域
+        /// </summary>
+        public string Field { get; set; }
+        /// <summary>
+        /// 话术范例
+        /// </summary>
+        public string TalkCase { get; set; }
+        /// <summary>
+        /// 创建者Id
+        /// </summary>
+        public int CreateUserId { get; set; }
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark { get; set; }
+    }
+    /// <summary>
+    /// 导出请示参数
+    /// </summary>
+    public class AskAdviceDerive
+    {
+        public int DiId { get; set; }
+
+        public int[] IdList { get; set; }
+    }
+}

+ 40 - 0
OASystem/OASystem.Domain/Entities/Groups/Grp_DelegationEnData.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Groups
+{
+    /// <summary>
+    /// 团组英文资料
+    /// </summary>
+    [SugarTable("Grp_DelegationEnData")]
+    public class Grp_DelegationEnData:EntityBase
+    {
+        /// <summary>
+        ///  区域
+        /// </summary>
+        public string Area { get; set; }
+
+        /// <summary>
+        ///  职务
+        /// </summary>
+        public string Job { get; set; }
+
+        /// <summary>
+        ///  职务英文
+        /// </summary>
+        public string JobEn { get; set; }
+
+        /// <summary>
+        ///  背景
+        /// </summary>
+        public string DelegationSetting { get; set; }
+
+        /// <summary>
+        ///  背景英文
+        /// </summary>
+        public string DelegationSettingEn { get; set; }
+    }
+}

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

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Resource
+{
+    /// <summary>
+    /// 请示数据库表
+    /// </summary>
+    [SugarTable("Res_AskData")]
+    public class Res_AskData:EntityBase
+    {
+        /// <summary>
+        /// 关联团组
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        public string DeleName { get; set; } = "";
+        /// <summary>
+        /// 国家
+        /// 
+        /// </summary>
+        [SugarColumn(IsNullable =true,ColumnDataType ="varchar(100)")]
+        public string Country { get; set; }
+        /// <summary>
+        /// 地区
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
+        public string Area { get; set; }
+        /// <summary>
+        /// 公务方名称
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
+        public string UnitName { get; set; }
+        /// <summary>
+        /// 涉及领域
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        public string Field { get; set; }
+        /// <summary>
+        /// 话术范例
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
+        public string TalkCase { get; set; }
+    }
+}

+ 88 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationEnDataRepository.cs

@@ -0,0 +1,88 @@
+using AutoMapper;
+using OASystem.Domain;
+using OASystem.Domain.Dtos.Groups;
+using OASystem.Domain.Entities.Groups;
+using OASystem.Domain.Entities.Resource;
+using OASystem.Domain.ViewModels.Groups;
+using OASystem.Infrastructure.Repositories.System;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Infrastructure.Repositories.Groups
+{
+    public class DelegationEnDataRepository : BaseRepository<Grp_DelegationEnData, Grp_DelegationEnData>
+    {
+
+
+        private readonly IMapper _mapper;
+        public DelegationEnDataRepository(SqlSugarClient sqlSugar, IMapper mapper) : base(sqlSugar)
+        {
+            _mapper = mapper;
+        }
+
+        /// <summary>
+        /// 团组英文资料操作(Status:1.新增,2.修改)
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        /// <exception cref="NotImplementedException"></exception>
+        public async Task<Result> OpDelegationEnData(OpDelegationEnDataDto dto)
+        {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+            try
+            {
+                if (dto.Status == 1)//添加
+                {
+                    string selectSql = string.Format(@"select * from Grp_DelegationEnData where Area='{0}' and Job='{1}' and IsDel='{2}'", dto.Area, dto.Job, 0);
+                    var grp_DelegationEnData = await _sqlSugar.SqlQueryable<Grp_DelegationEnData>(selectSql).FirstAsync();//查询是否存在
+                    if (grp_DelegationEnData != null)
+                    {
+                        return result = new Result() { Code = -1, Msg = "该信息已存在,请勿重复添加!" };
+
+                    }
+                    else//不存在,可添加
+                    {
+
+                        Grp_DelegationEnData _DelegationEnData = _mapper.Map<Grp_DelegationEnData>(dto);
+                        int id = await _sqlSugar.Insertable(_DelegationEnData).ExecuteReturnIdentityAsync();
+                        if (id == 0)
+                        {
+                            return result = new Result() { Code = -1, Msg = "添加失败!" };
+
+                        }
+                        return result = new Result() { Code = 0, Msg = "添加成功!", Data = new { Id = id } };
+                    }
+                }
+                else if (dto.Status == 2)//修改
+                {
+                    bool res = await UpdateAsync(a => a.Id == dto.Id, a => new Grp_DelegationEnData
+                    {
+                        Area = dto.Area,
+                        Job = dto.Job,
+                        JobEn = dto.JobEn,
+                        DelegationSetting = dto.DelegationSetting,
+                        DelegationSettingEn = dto.DelegationSettingEn,
+                        CreateUserId = dto.CreateUserId,
+                        Remark = dto.Remark,
+                    });
+                    if (!res)
+                    {
+                        return result = new Result() { Code = -1, Msg = "修改失败!" };
+                    }
+                    return result = new Result() { Code = 0, Msg = "修改成功!", Data = new { Id = dto.Id } };
+                }
+                else
+                {
+                    return result = new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" };
+                }
+            }
+            catch (Exception ex)
+            {
+                return result = new Result() { Code = -2, Msg = "程序错误!" };
+            }
+        }
+    }
+}

+ 130 - 0
OASystem/OASystem.Infrastructure/Repositories/Resource/AskDataRepository.cs

@@ -0,0 +1,130 @@
+using AutoMapper;
+using OASystem.Domain;
+using OASystem.Domain.Dtos.Resource;
+using OASystem.Domain.Entities.Groups;
+using OASystem.Domain.Entities.Resource;
+using OASystem.Domain.ViewModels.Resource;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Infrastructure.Repositories.Resource
+{
+    public class AskDataRepository : BaseRepository<Res_AskData, QueryAskDataDto>
+    {
+        private readonly IMapper _mapper;
+        public AskDataRepository(SqlSugarClient sqlSugar, IMapper mapper) : base(sqlSugar)
+        {
+            _mapper = mapper;
+        }
+        
+
+        public async Task<Result> QueryAskData(QueryAskDataDto dto)
+        {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+            try
+            {
+                string sqlWhere = string.Empty;
+                if (!string.IsNullOrWhiteSpace(dto.Country))
+                {
+                    sqlWhere += string.Format(@"And Country like '%{0}%'", dto.Country);
+                }
+                if (!string.IsNullOrWhiteSpace(dto.Area))
+                {
+                    sqlWhere += string.Format(@"And Area like '%{0}%'", dto.Area);
+                }
+                if (!string.IsNullOrWhiteSpace(dto.Field))
+                {
+                    sqlWhere += string.Format(@"And Field like '%{0}%'", dto.Field);
+                }
+                sqlWhere += string.Format(@"And IsDel={0}", 0);
+
+                if (!string.IsNullOrEmpty(sqlWhere.Trim()))
+                {
+                    Regex r = new Regex("And");
+                    sqlWhere = r.Replace(sqlWhere, "Where", 1);
+                }
+                string sql = string.Format(@"select * from Res_AskData {0} order by CreateTime desc", sqlWhere);
+                List<Res_AskData> askDatd = await _sqlSugar.SqlQueryable<Res_AskData>(sql).ToListAsync();
+                List<Grp_DelegationInfo> delegationInfo=await _sqlSugar.Queryable<Grp_DelegationInfo>().Where(a=>a.IsDel==0).ToListAsync();
+                if (askDatd.Count != 0 && delegationInfo.Count!=0)
+                {
+                    result = new Result() { Code = 0, Msg = "查询成功!", Data = new { askDatd= askDatd, delegationInfo= delegationInfo } };
+                }
+                else
+                {
+                    result = new Result() { Code = 0, Msg = "暂无数据!", Data = new { askDatd = askDatd, delegationInfo = delegationInfo } };
+                }
+            }
+            catch (Exception ex)
+            {
+                result = new Result() { Code = -2, Msg = "未知错误" };
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// 请示数据库操作(Status:1.新增,2.修改)
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        /// <exception cref="NotImplementedException"></exception>
+        public async Task<Result> OpAskData(OpAskDataDto dto)
+        {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+            try
+            {
+                if (dto.Status == 1)//添加
+                {
+                    string selectSql = string.Format(@"select * from Res_AskData where Country='{0}' and Area='{1}' and UnitName='{2} and IsDel={3}'", dto.Country, dto.Area,dto.UnitName, 0);
+                    var res_AskData = await _sqlSugar.SqlQueryable<Res_AskData>(selectSql).FirstAsync();//查询是否存在
+                    if (res_AskData != null)
+                    {
+                        return result = new Result() { Code = -1, Msg = "该信息已存在,请勿重复添加!" };
+
+                    }
+                    else//不存在,可添加
+                    {
+
+                        Res_AskData _AskData = _mapper.Map<Res_AskData>(dto);
+                        int id = await _sqlSugar.Insertable(_AskData).ExecuteReturnIdentityAsync();
+                        if (id == 0)
+                        {
+                            return result = new Result() { Code = -1, Msg = "添加失败!" };
+
+                        }
+                        return result = new Result() { Code = 0, Msg = "添加成功!", Data = new { Id = id } };
+                    }
+                }
+                else if (dto.Status == 2)//修改
+                {
+                    bool res = await UpdateAsync(a => a.Id == dto.Id, a => new Res_AskData
+                    {
+                        Country=dto.Country,
+                        Area=dto.Area,
+                        UnitName =dto.UnitName,
+                        Field =dto.Field,
+                        TalkCase =dto.TalkCase,
+                        CreateUserId = dto.CreateUserId,
+                        Remark = dto.Remark,
+                    });
+                    if (!res)
+                    {
+                        return result = new Result() { Code = -1, Msg = "修改失败!" };
+                    }
+                    return result = new Result() { Code = 0, Msg = "修改成功!", Data = new { Id = dto.Id } };
+                }
+                else
+                {
+                    return result = new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" };
+                }
+            }
+            catch (Exception ex)
+            {
+                return result = new Result() { Code = -2, Msg = "程序错误!" };
+            }
+        }
+    }
+}