Browse Source

1、酒店自动审核及相关模块更改

leiy 10 months ago
parent
commit
79ae440f82

+ 0 - 4
OASystem/EntitySync/EntitySync.csproj

@@ -13,8 +13,4 @@
     <PackageReference Include="SqlSugarCore" Version="5.1.3.32" />
     <PackageReference Include="SqlSugarCore" Version="5.1.3.32" />
   </ItemGroup>
   </ItemGroup>
 
 
-  <ItemGroup>
-    <ProjectReference Include="..\OASystem.Domain\OASystem.Domain.csproj" />
-  </ItemGroup>
-
 </Project>
 </Project>

+ 19 - 11
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -138,6 +138,7 @@ namespace OASystem.API.Controllers
         private readonly ThreeCodeRepository _threeCodeRepository;
         private readonly ThreeCodeRepository _threeCodeRepository;
 
 
         private readonly HotelInquiryRepository _hotelInquiryRep;
         private readonly HotelInquiryRepository _hotelInquiryRep;
+        private readonly FeeAuditRepository _feeAuditRep;
 
 
         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,
@@ -146,7 +147,8 @@ namespace OASystem.API.Controllers
             CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
             CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
             GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
             GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
             TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
             TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
-            InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep, HotelInquiryRepository hotelInquiryRep, ThreeCodeRepository threeCodeRepository)
+            InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep, HotelInquiryRepository hotelInquiryRep, 
+            ThreeCodeRepository threeCodeRepository, FeeAuditRepository feeAuditRep)
         {
         {
             _mapper = mapper;
             _mapper = mapper;
             _grpScheduleRep = grpScheduleRep;
             _grpScheduleRep = grpScheduleRep;
@@ -185,6 +187,7 @@ namespace OASystem.API.Controllers
             _ticketBlackCodeRep = ticketBlackCodeRep;
             _ticketBlackCodeRep = ticketBlackCodeRep;
             _hotelInquiryRep = hotelInquiryRep;
             _hotelInquiryRep = hotelInquiryRep;
             _threeCodeRepository = threeCodeRepository;
             _threeCodeRepository = threeCodeRepository;
+            _feeAuditRep = feeAuditRep;
         }
         }
 
 
         #region 流程管控
         #region 流程管控
@@ -9248,16 +9251,21 @@ ORDER by  gctggrc.id DESC
             }
             }
 
 
             #region 应用推送
             #region 应用推送
-            //TODO:酒店预订费用消息推送 移动端完成后取消注释
-            //try
-            //{
-            //    int ccpId = (int)_view.Data.GetType().GetProperty("ccpId").GetValue(_view.Data, null);
-            //    int sign = (int)_view.Data.GetType().GetProperty("sign").GetValue(_view.Data, null);
-            //    await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
-            //}
-            //catch (Exception ex)
-            //{
-            //}
+            
+            try
+            {
+                int ccpId = (int)_view.Data.GetType().GetProperty("ccpId").GetValue(_view.Data, null);
+                int sign = (int)_view.Data.GetType().GetProperty("sign").GetValue(_view.Data, null);
+                int hotelId = (int)_view.Data.GetType().GetProperty("hotelId").GetValue(_view.Data, null);
+                await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
+
+                //自动审核
+                await _feeAuditRep.FeeAutomaticAudit(1,_dto.DiId,hotelId);
+
+            }
+            catch (Exception ex)
+            {
+            }
             #endregion
             #endregion
 
 
             return Ok(_view);
             return Ok(_view);

+ 34 - 1
OASystem/OASystem.Domain/Dtos/Statistics/MarketingSalesDto.cs

@@ -145,7 +145,40 @@ namespace OASystem.Domain.Dtos.Statistics
         /// Id < 1 添加
         /// Id < 1 添加
         /// </summary>
         /// </summary>
         public int Id { get; set; }
         public int Id { get; set; }
-       
+
+        /// <summary>diid
+        /// </summary>
+        public int DiId { get; set; }
+
+        /// <summary>
+        /// 拜访时间 - 开始 
+        /// </summary>
+        public string BeginDt { get; set; }
+        /// <summary>
+        /// 拜访时间 - 结束
+        /// </summary>
+        public string EndDt { get; set; }
+        /// <summary>
+        /// 客户单位
+        /// </summary>
+        public string CustomerUnit { get; set; }
+        /// <summary>
+        /// 客户工作
+        /// </summary>
+        public string CustomerJob { get; set; }
+        /// <summary>
+        /// 客户姓名
+        /// </summary>
+        public string CustomerName { get; set; }
+        /// <summary>
+        /// 客户联系方式
+        /// </summary>
+        public string CustomerContact { get; set; }
+        /// <summary>
+        /// 拜访内容
+        /// </summary>
+        public string Remark { get; set; }
+
     }
     }
 
 
     public class MarketingSalesVCSaveDto: MarketingSalesUserPageFuncDtoBase
     public class MarketingSalesVCSaveDto: MarketingSalesUserPageFuncDtoBase

+ 1 - 1
OASystem/OASystem.Domain/Entities/Groups/Grp_CreditCardPayment.cs

@@ -134,7 +134,7 @@ namespace OASystem.Domain.Entities.Groups
         public string  AuditMFDate { get; set; }
         public string  AuditMFDate { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// 总经理是否审核  0 未审核 1已通过 2未通过
+        /// 总经理是否审核  0 未审核 1已通过 2未通过 3 自动审核
         /// </summary>
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int IsAuditGM { get; set; }
         public int IsAuditGM { get; set; }

+ 175 - 0
OASystem/OASystem.Domain/ViewModels/Groups/FeeAuditView.cs

@@ -0,0 +1,175 @@
+using OASystem.Domain.Entities.Groups;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.ViewModels.Groups
+{
+    public class FeeAuditView
+    {
+    }
+
+    /// <summary>
+    /// GroupCostView
+    /// </summary>
+    public class GroupCostView: Grp_GroupCost
+    {
+        #region OP 自动审核相关
+
+       
+
+        /// <summary>
+        /// 自动审核 - 车费用
+        /// </summary>
+        public decimal CarFee
+        {
+            get { return CarCost; }
+            set { CarCost = value; }
+        }
+
+        /// <summary>
+        /// TODO:(没有具体匹配项)自动审核 - 车超时费用
+        /// </summary>
+        public decimal CarOverTimeFee { get; set; }
+
+        /// <summary>
+        /// 自动审核 - 导游费用
+        /// </summary>
+        public decimal GuideFee
+        {
+            get { return TGS; }
+            set { TGS = value; }
+        }
+
+        /// <summary>
+        /// 自动审核 - 导游景点费用
+        /// </summary>
+        public decimal GuideScenicFee { 
+            get { return TGEF; } 
+            set { TGEF = value; } 
+        }
+
+        /// <summary>
+        /// 自动审核  - 导游小费
+        /// </summary>
+        public decimal GuideTipFee 
+        { 
+            get { return TGTips; } 
+            set { TGTips = value; } 
+        }
+
+        /// <summary>
+        /// 自动审核 - 导游餐费
+        /// </summary>
+        public decimal GuideMealFee { 
+            get { return TGM; } 
+            set { TGM = value; } 
+        }
+
+        /// <summary>
+        /// 自动审核 - 导游住宿费
+        /// </summary>
+        public decimal GuideRoomFee { get { return TGA; } set { TGA = value;} }
+
+        /// <summary>
+        /// 自动审核 - 导游交通费
+        /// </summary>
+        public decimal GuideTrafficFee { get { return TGTF; } set { TGTF = value; } }
+
+        /// <summary>
+        /// 自动审核 - 导游超时费用 
+        /// </summary>
+        public decimal GuideOverTimeFee { get { return TGOF; } set { TGOF = value; } }
+
+        /// <summary>
+        /// 自动审核 - 司机费用
+        /// </summary>
+        public decimal DriverFee { get { return CFS; } set { CFS = value; } }
+
+        //自动审核 - 司机小费
+        public decimal DriverTipFee { get { return DRVTips; } set { DRVTips = value; } }
+
+        /// <summary>
+        /// 自动审核 - 司机餐费
+        /// </summary>
+        public decimal DriverMealFee { get { return CFM; } set { CFM = value; } }
+
+        /// <summary>
+        /// TODO:(没有具体匹配项)自动审核 - 司机超时费用
+        /// </summary>
+        public decimal DriverOverTimeFee { get; set; }
+
+        /// <summary>
+        /// 自动审核 - 客户早餐
+        /// </summary>
+        public decimal ClientBreakfastFee { get { return B; } set { B = value; } }
+
+        /// <summary>
+        /// TODO:(没有具体匹配项)自动审核 - 客户早餐超支费用
+        /// </summary>
+        public decimal ClientBreakfastOverFee { get; set; }
+
+        /// <summary>
+        /// 自动审核 - 客户午餐
+        /// </summary>
+        public decimal ClientLunchFee { get { return L; } set { L = value; } }
+
+        /// <summary>
+        /// TODO:(没有具体匹配项)自动审核 - 客户午餐超支费用
+        /// </summary>
+        public decimal ClientLunchOverFee { get; set; }
+        
+        /// <summary>
+        /// 自动审核 - 客户晚餐
+        /// </summary>
+        public decimal ClientDinnerFee { get { return D; } set { D = value; } }
+
+        /// <summary>
+        /// TODO:(没有具体匹配项)自动审核 - 客户晚餐超支费用
+        /// </summary>
+        public decimal ClientDinnerOverFee { get; set; }
+
+        /// <summary>
+        /// 自动审核 - 景点门票费用
+        /// </summary>
+        public decimal ScenicTicketFee { get { return EF; } set { EF = value; } }
+
+        /// <summary>
+        /// 自动审核 - 饮料/零食/水果 费用
+        /// </summary>
+        public decimal DrinkSnackFruitFee { get { return B_R_F; } set { B_R_F = value; } }
+
+        /// <summary>
+        /// 自动审核 - 翻译费
+        /// </summary>
+        public decimal TranslatorFee { get { return IF; } set { IF = value; } }
+
+        /// <summary>
+        /// TODO:(没有具体匹配项)自动审核 - 翻译超时费
+        /// </summary>
+        public decimal TranslatorOverTimeFee { get; set; }
+
+        #endregion
+
+        #region 自动审核 - 酒店相关字段
+
+        /// <summary>
+        /// 酒店单间费用
+        /// </summary>
+        public decimal HotelSingleRoomFee { get { return SGR; } set { SGR = value; } }
+
+        //酒店双间费用
+        public decimal HotelDoubleRoomFee { get { return TBR; } set { TBR = value; } }
+
+        //酒店小套房/豪华套房费用
+        public decimal HotelSuiteRoomFee { get { return JS_ES; } set { JS_ES = value; } }
+
+        //酒店套房费用
+        public decimal HotelSuiteFee { get { return Suite; } set { Suite = value; } }
+
+        #endregion
+
+    }
+}

+ 1 - 1
OASystem/OASystem.Domain/ViewModels/Groups/HotelReservationsByDiIdView.cs

@@ -94,7 +94,7 @@ namespace OASystem.Domain.ViewModels.Groups
                 if (IsAuditGM == 0) auditStatus = "未审核";
                 if (IsAuditGM == 0) auditStatus = "未审核";
                 else if (IsAuditGM == 1) auditStatus = "已审核";
                 else if (IsAuditGM == 1) auditStatus = "已审核";
                 else if(IsAuditGM == 2) auditStatus = "未通过";
                 else if(IsAuditGM == 2) auditStatus = "未通过";
-                else if (IsAuditGM == 4) auditStatus = "自动审核";
+                else if (IsAuditGM == 3) auditStatus = "自动审核";
 
 
                 return auditStatus;
                 return auditStatus;
             } }
             } }

+ 8 - 7
OASystem/OASystem.Domain/ViewModels/Groups/VisitingClientsView.cs

@@ -14,14 +14,15 @@ namespace OASystem.Domain.ViewModels.Groups
     public class VisitingClientsListView
     public class VisitingClientsListView
     {
     {
         public int RowNumber { get; set; }
         public int RowNumber { get; set; }
-        ///// <summary>
-        ///// opearate 时
-        ///// Id > 0 修改
-        ///// Id < 1 添加
-        ///// </summary>
-        //public int Id { get; set; }
+        /// <summary>
+        /// opearate 时
+        /// Id > 0 修改
+        /// Id < 1 添加
+        /// </summary>
+        public int Id { get; set; }
 
 
-        /// <summary>diid
+        /// <summary>
+        /// diid
         /// </summary>
         /// </summary>
         public int DiId { get; set; }
         public int DiId { get; set; }
 
 

+ 170 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/FeeAuditRepository.cs

@@ -0,0 +1,170 @@
+using NPOI.SS.Formula.Functions;
+using OASystem.Domain;
+using OASystem.Domain.Entities.Groups;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Infrastructure.Repositories.Groups
+{
+    /// <summary>
+    /// 费用审核仓储
+    /// </summary>
+    public class FeeAuditRepository:BaseRepository<EntityBase,ViewBase>
+    {
+        public FeeAuditRepository(SqlSugarClient sqlSugar) : base(sqlSugar)
+        { 
+            
+        }
+
+        /// <summary>
+        /// 费用自动审核
+        /// </summary>
+        /// <param name="feeType">
+        /// 1.酒店 76 
+        /// 2.op 79
+        /// </param>
+        /// <param name="diId">团组Id</param>
+        /// <param name="dataId">数据Id(模块类型主表Id)</param>
+        /// <returns></returns>
+        public async Task<JsonView> FeeAutomaticAudit(int feeType, int diId, int dataId)
+        {
+            var _view = new JsonView() { Code = 201, Msg = "自动审核操作失败" };
+            if (diId < 1) { _view.Msg = MsgTips.DiId; return _view; }
+            if (dataId < 1) { _view.Msg = MsgTips.Id; return _view; }
+
+            List<int> stids = new List<int>() { 17, 66 };
+            var setData = _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && stids.Contains(x.STid)).ToList();
+            string _teamCurrency = string.Empty;
+            decimal _rate = 0.00M;
+            var groupInfo = _sqlSugar.Queryable< Grp_GroupCostParameter >().Where(x => x.IsDel ==0 && x.DiId == diId).First();
+            if (groupInfo == null) { _view.Msg = $"团组成本信息未填写!"; return _view; }
+            _teamCurrency = groupInfo.Currency;
+            //币种验证  统一为currencycode三字码
+            if (int.TryParse(_teamCurrency,out int currency))
+            {
+                _teamCurrency = setData.Find(x => x.Id == currency)?.Name ?? "";
+            }
+            _rate = groupInfo.Rate;
+            var costContents =  _sqlSugar.Queryable<Grp_GroupCost>().Where(x => x.IsDel == 0 && x.Diid == diId).ToList();
+            if (costContents.Count < 1) { _view.Msg = $"团组成本信息未填写!"; return _view; }
+
+            //处理 成本详细信息 日期为空
+            for (int i = 0; i < costContents.Count; i++)
+            {
+                if (string.IsNullOrEmpty( costContents[i].Date))
+                {
+                    int index = i - 1;
+                    if (index >= 0)
+                    {
+                        costContents[i].Date = costContents[index].Date;
+                    }
+                }
+            }
+
+            if (feeType == 1)
+            {
+                var hotelCostInfo = _sqlSugar.Queryable<Grp_HotelReservations>().Where(x => x.IsDel == 0 && x.DiId == diId && x.Id == dataId).First();
+                var hotelCostDetails = _sqlSugar.Queryable<Grp_HotelReservationsContent>().Where(x => x.IsDel == 0 && x.DiId == diId && x.HrId == dataId).ToList();
+                if (hotelCostInfo == null)
+                {
+                    _view.Msg = $"酒店费用数据未填写";
+                    return _view;
+                }
+
+                //验证币种是否相等
+                string hotelCurrency = setData.Find(x => x.Id == hotelCostInfo.CardPriceCurrency)?.Name ?? "";
+                if (hotelCurrency != _teamCurrency)
+                {
+                    if (!hotelCurrency.Equals("CNY"))
+                    {
+                        _view.Msg = $"币种不一致";
+                        return _view;
+                    }
+                }
+                else _rate = 1.0000M;
+
+                bool isAutoAudit = true; //是否自动审核
+                DateTime checkIn = Convert.ToDateTime(hotelCostInfo.CheckInDate),
+                         checkOut = Convert.ToDateTime(hotelCostInfo.CheckOutDate);
+                var hotelCostInfos = costContents.Where(x => Convert.ToDateTime(x.Date) >= checkIn && Convert.ToDateTime(x.Date) <= checkOut).ToList();
+                if (hotelCostInfos.Count < 1) isAutoAudit = false;
+
+                decimal otherFee = hotelCostDetails.Where(x => x.PriceType != 1).Sum(x => x.Price);
+                if (otherFee > 0) { otherFee /= 3; }
+
+                foreach (var item in hotelCostInfos)
+                {
+                    //1.判断费用是否 <= 成本费用
+                    //1.1 判断单间费用
+                    if (item.SGR > 0)
+                    {
+                        decimal singleRoomPrice = hotelCostInfo.SingleRoomPrice + otherFee;
+                        if (singleRoomPrice > item.SGR * _rate) isAutoAudit = false;
+                    }
+                    //1.2 判断双人间费用
+                    if (item.TBR > 0)
+                    { 
+                        decimal doubleRoomPrice = hotelCostInfo.DoubleRoomPrice + otherFee;
+                        if (doubleRoomPrice > item.TBR * _rate) isAutoAudit = false;
+                    }
+                    //1.3 判断套房费用
+                    if (item.Suite > 0)
+                    { 
+                        decimal suiteRoomPrice = hotelCostInfo.SuiteRoomPrice + otherFee;
+                        if (suiteRoomPrice > item.Suite * _rate) isAutoAudit = false;
+                    }
+                    //1.4 判断其他房型费用
+                    if (item.JS_ES > 0)
+                    { 
+                        decimal otherRoomPrice = hotelCostInfo.OtherRoomPrice + otherFee;
+                        if (otherRoomPrice > item.JS_ES * _rate) isAutoAudit = false;
+                    }
+                }
+
+                //2.判断是否自动审核
+                if (isAutoAudit)
+                {
+                    var ccpUpdate = _sqlSugar.Updateable<Grp_CreditCardPayment>()
+                                       .SetColumns(it => it.IsAuditGM == 3)
+                                       .SetColumns(it => it.AuditGMOperate == 4)
+                                       .SetColumns(it => it.AuditGMDate == DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))
+                                       .Where(s => s.DIId == diId && s.CTable == 76 && s.CId == dataId)
+                                       .ExecuteCommand();
+                    if (ccpUpdate > 0)
+                    {
+                        _view.Code = 200;
+                        _view.Msg = "审核成功";
+                        return _view;
+                    }
+                }
+                else {
+                    //撤销该条数据的自动审核 --> 该条数据的审核状态是自动审核  3 --> 0
+                    var ccpInfo = _sqlSugar.Queryable<Grp_CreditCardPayment>()
+                                           .Where(s => s.DIId == diId && s.CTable == 76 && s.CId == dataId && s.IsAuditGM == 3)
+                                           .First();
+                    if (ccpInfo != null)
+                    {
+                        var ccpUpdate = _sqlSugar.Updateable<Grp_CreditCardPayment>()
+                                       .SetColumns(it => it.IsAuditGM == 0)
+                                       .SetColumns(it => it.AuditGMOperate == 0)
+                                       .SetColumns(it => it.AuditGMDate == string.Empty)
+                                       .Where(s => s.Id == ccpInfo.Id)
+                                       .ExecuteCommand();
+                    }
+                }
+            }
+            else if (feeType == 2)
+            {
+                //1.含超时费用 手动审核
+
+            }
+            else _view.Msg = $"请传入有效的feeType参数";
+
+            return _view;
+        }
+
+    }
+}

+ 2 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/HotelPriceRepository.cs

@@ -408,7 +408,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
 
                     _view.Msg = "操作成功!";
                     _view.Msg = "操作成功!";
                     _view.Code = 200;
                     _view.Code = 200;
-                    _view.Data = new { ccpId = ccpId, sign = 1 };
+                    _view.Data = new { ccpId = ccpId, sign = 1, hotelId = hotelId };
                     _sqlSugar.CommitTran(); // 提交
                     _sqlSugar.CommitTran(); // 提交
 
 
                     return _view;
                     return _view;
@@ -535,7 +535,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
 
                     _view.Msg = "操作成功!";
                     _view.Msg = "操作成功!";
                     _view.Code = 200;
                     _view.Code = 200;
-                    _view.Data = new { ccpId = _CreditCardPayment.Id, sign = 2 };
+                    _view.Data = new { ccpId = _CreditCardPayment.Id, sign = 2 ,hotelId = _HotelReservations.Id };
                     _sqlSugar.CommitTran(); // 提交
                     _sqlSugar.CommitTran(); // 提交
                     return _view;
                     return _view;
                 }
                 }

+ 2 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/InvitationOfficialActivitiesRepository.cs

@@ -40,7 +40,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 Res_InvitationOfficialActivityData res_InvitationOfficialActivityData = new Res_InvitationOfficialActivityData();
                 Res_InvitationOfficialActivityData res_InvitationOfficialActivityData = new Res_InvitationOfficialActivityData();
                 if (grp_Invitation!=null)
                 if (grp_Invitation!=null)
                 {
                 {
-                    res_InvitationOfficialActivityData = _sqlSugar.Queryable<Res_InvitationOfficialActivityData>().First(a =>a.Country==grp_Invitation.InviterArea && a.UnitName==grp_Invitation.Inviter && a.IsDel == 0);
+                    res_InvitationOfficialActivityData = _sqlSugar.Queryable<Res_InvitationOfficialActivityData>()
+                                                                  .First(a =>a.Country==grp_Invitation.InviterArea && a.UnitName==grp_Invitation.Inviter && a.IsDel == 0);
                     if (dto.PortType == 1)
                     if (dto.PortType == 1)
                     {
                     {
                         var data = new
                         var data = new

+ 13 - 13
OASystem/OASystem.sln

@@ -5,17 +5,17 @@ VisualStudioVersion = 17.4.33110.190
 MinimumVisualStudioVersion = 10.0.40219.1
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OASystem.API", "OASystem.Api\OASystem.API.csproj", "{3891356C-85CE-4023-9EF8-C34AF3ED85AA}"
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OASystem.API", "OASystem.Api\OASystem.API.csproj", "{3891356C-85CE-4023-9EF8-C34AF3ED85AA}"
 EndProject
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OASystem.Domain", "OASystem.Domain\OASystem.Domain.csproj", "{5521637F-1CB4-477C-A9E4-D20F6827EA85}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OASystem.Infrastructure", "OASystem.Infrastructure\OASystem.Infrastructure.csproj", "{D9FF00D1-EA3C-48E4-A4BF-53015DEBF767}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntitySync", "EntitySync\EntitySync.csproj", "{74A92C44-8616-4DA9-BDA0-C764796090A5}"
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntitySync", "EntitySync\EntitySync.csproj", "{74A92C44-8616-4DA9-BDA0-C764796090A5}"
 EndProject
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_Doc", "_Doc\_Doc.csproj", "{F832A3AA-9BDB-4699-854C-5A4C2948DDDC}"
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_Doc", "_Doc\_Doc.csproj", "{F832A3AA-9BDB-4699-854C-5A4C2948DDDC}"
 EndProject
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OASystem.RedisRepository", "OASystem.RedisRepository\OASystem.RedisRepository.csproj", "{61A68BE5-21A1-4B3B-9267-757A8BAB4E69}"
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OASystem.RedisRepository", "OASystem.RedisRepository\OASystem.RedisRepository.csproj", "{61A68BE5-21A1-4B3B-9267-757A8BAB4E69}"
 EndProject
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpWin", "OpWin\OpWin.csproj", "{9967A29F-BBDE-459D-8515-59D766293983}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpWin", "OpWin\OpWin.csproj", "{9967A29F-BBDE-459D-8515-59D766293983}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OASystem.Domain", "OASystem.Domain\OASystem.Domain.csproj", "{1EAF06EF-442F-4B14-8F21-DAE06799B250}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OASystem.Infrastructure", "OASystem.Infrastructure\OASystem.Infrastructure.csproj", "{F82036CE-3D8F-4376-BD68-DB5DC0EA2FCF}"
 EndProject
 EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -27,14 +27,6 @@ Global
 		{3891356C-85CE-4023-9EF8-C34AF3ED85AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{3891356C-85CE-4023-9EF8-C34AF3ED85AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{3891356C-85CE-4023-9EF8-C34AF3ED85AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{3891356C-85CE-4023-9EF8-C34AF3ED85AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{3891356C-85CE-4023-9EF8-C34AF3ED85AA}.Release|Any CPU.Build.0 = Release|Any CPU
 		{3891356C-85CE-4023-9EF8-C34AF3ED85AA}.Release|Any CPU.Build.0 = Release|Any CPU
-		{5521637F-1CB4-477C-A9E4-D20F6827EA85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{5521637F-1CB4-477C-A9E4-D20F6827EA85}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{5521637F-1CB4-477C-A9E4-D20F6827EA85}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{5521637F-1CB4-477C-A9E4-D20F6827EA85}.Release|Any CPU.Build.0 = Release|Any CPU
-		{D9FF00D1-EA3C-48E4-A4BF-53015DEBF767}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{D9FF00D1-EA3C-48E4-A4BF-53015DEBF767}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{D9FF00D1-EA3C-48E4-A4BF-53015DEBF767}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{D9FF00D1-EA3C-48E4-A4BF-53015DEBF767}.Release|Any CPU.Build.0 = Release|Any CPU
 		{74A92C44-8616-4DA9-BDA0-C764796090A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{74A92C44-8616-4DA9-BDA0-C764796090A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{74A92C44-8616-4DA9-BDA0-C764796090A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{74A92C44-8616-4DA9-BDA0-C764796090A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{74A92C44-8616-4DA9-BDA0-C764796090A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{74A92C44-8616-4DA9-BDA0-C764796090A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -51,6 +43,14 @@ Global
 		{9967A29F-BBDE-459D-8515-59D766293983}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{9967A29F-BBDE-459D-8515-59D766293983}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{9967A29F-BBDE-459D-8515-59D766293983}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{9967A29F-BBDE-459D-8515-59D766293983}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{9967A29F-BBDE-459D-8515-59D766293983}.Release|Any CPU.Build.0 = Release|Any CPU
 		{9967A29F-BBDE-459D-8515-59D766293983}.Release|Any CPU.Build.0 = Release|Any CPU
+		{1EAF06EF-442F-4B14-8F21-DAE06799B250}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{1EAF06EF-442F-4B14-8F21-DAE06799B250}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1EAF06EF-442F-4B14-8F21-DAE06799B250}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{1EAF06EF-442F-4B14-8F21-DAE06799B250}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F82036CE-3D8F-4376-BD68-DB5DC0EA2FCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F82036CE-3D8F-4376-BD68-DB5DC0EA2FCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F82036CE-3D8F-4376-BD68-DB5DC0EA2FCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F82036CE-3D8F-4376-BD68-DB5DC0EA2FCF}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE