Browse Source

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

123456 10 months ago
parent
commit
3463367178

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

@@ -10856,56 +10856,12 @@ namespace OASystem.API.Controllers
         {
             _airTicketResRep.ChangeDataBase(DBEnum.OA2014DB);
 
-            string sqlOld = string.Format(@" Select * From OfficialActivities With(nolock) ");
+            string sqlOld = string.Format(@" Select * From AirTicketReservations With(nolock) ");
 
-            List<OA2014_OfficialActivities> listOld = _airTicketResRep._sqlSugar.SqlQueryable<OA2014_OfficialActivities>(sqlOld).ToList();
-            Dictionary<string, int> dic = new Dictionary<string, int>();
-            dic.Add("座谈", 383);
-            dic.Add("参观", 384);
-            dic.Add("推介会", 385);
-            dic.Add("路演", 386);
+            List<oa2021_AirTicketReservations> listOld = _airTicketResRep._sqlSugar.SqlQueryable<oa2021_AirTicketReservations>(sqlOld).ToList();
 
 
             _airTicketResRep.ChangeDataBase(DBEnum.OA2023DB);
-            foreach (var item in listOld)
-            {
-                Res_OfficialActivities temp = new Res_OfficialActivities();
-
-                temp.DiId = item.Diid;
-                temp.Type = item.Type;
-                temp.Client = item.Client;
-                temp.Date = item.Date;
-                temp.Time = item.Time;
-
-                temp.Address = item.Address;
-                temp.Contact = item.Contact;
-                temp.Job = item.Job;
-                temp.Tel = item.Tel;
-                temp.OfficialForm = dic[item.Form];
-
-                temp.Setting = item.Setting;
-                temp.Dresscode = item.Dresscode;
-                temp.Attendees = item.Attendees;
-                temp.IsNeedTrans = item.IsNeedTrans.ToLower() == "true" ? 1 : 0;
-                temp.Translators = item.Translators;
-
-                temp.language = item.Language;
-                temp.Trip = item.Trip;
-                temp.CreateUserId = item.Oper;
-                temp.CreateTime = DateTime.Parse(item.OpDate + " 00:00:00");
-                temp.Remark = "";
-
-                temp.IsDel = item.Isdel;
-                temp.IsSubmitApproval = item.IsSubmitApproval;
-                temp.IsPay = item.IsPay;
-
-                await _airTicketResRep.AddAsync<Res_OfficialActivities>(temp);
-            }
-
-
-            
-
-
 
             return Ok(JsonView(true, "操作成功!"));
         }

+ 7 - 7
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -411,7 +411,7 @@ namespace OASystem.API.Controllers
                                                      Left Join Sys_SetData sd4 On hr.BreakfastCurrency = sd4.Id
                                                      Left Join Sys_SetData sd5 On hr.GovernmentRentCurrency = sd5.Id
                                                      Left Join Sys_SetData sd6 On hr.CityTaxCurrency = sd6.Id
-                                                     Where hr.IsDel = 0 And ccp.IsDel = 0 And ccp.CTable = 76 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And hr.DiId = {0} 
+                                                     Where hr.IsDel = 0 And ccp.IsDel = 0 And ccp.CTable = 76 And ccp.IsAuditGM = 1 And ccp.PayMoney<> 0 And hr.DiId = {0} 
                                                      Order By CheckInDate Asc", _dto.DiId);
 
                 groupHotelFeeViews = await _sqlSugar.SqlQueryable<GroupHotelFeeView>(hotelFeeSql).ToListAsync();
@@ -465,7 +465,7 @@ namespace OASystem.API.Controllers
                                                      Left Join Sys_SetData sd1 On ccp.PayDId = sd1.Id
                                                      Left Join Sys_SetData sd2 On ccp.PaymentCurrency = sd2.Id
                                                      Left Join Sys_Users u On ccp.CreateUserId = u.Id
-                                                     Where ctggr.IsDel = 0 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And ctggr.DiId = {0}
+                                                     Where ctggr.IsDel = 0 And ccp.IsAuditGM = 1 And ctggr.DiId = {0}
                                                      Order By CreateTime", _dto.DiId);
 
                 groupCTGGRFeeViews = await _sqlSugar.SqlQueryable<GroupCTGGRFeeView>(CTGGRFeeSql).ToListAsync();
@@ -549,7 +549,7 @@ namespace OASystem.API.Controllers
                                                         Left Join Sys_SetData sd3 On ccp.CTDId = sd3.Id
                                                         Left Join Sys_SetData sd4 On atr.CType = sd4.Id
                                                         Left Join Sys_Users u On ccp.CreateUserId = u.Id
-                                                        Where atr.IsDel = 0 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And atr.DiId = {0} Order By CreateTime", _dto.DiId);
+                                                        Where atr.IsDel = 0 And ccp.IsAuditGM = 1 And atr.DiId = {0} Order By CreateTime", _dto.DiId);
                 groupAirFeeViews = await _sqlSugar.SqlQueryable<GroupAirFeeView>(groupAirFeeSql).ToListAsync();
 
                 string str = "";
@@ -746,7 +746,7 @@ namespace OASystem.API.Controllers
                                                          Left Join Sys_SetData sd2 On ccp.PayDId = sd2.Id
                                                          Left Join Sys_SetData sd3 On ccp.CTDId = sd3.Id
                                                          Left Join Sys_Users u On ccp.CreateUserId = u.Id
-                                                         Where vi.IsDel = 0 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And vi.DIId = {0} Order By CreateTime", _dto.DiId);
+                                                         Where vi.IsDel = 0 And ccp.IsAuditGM = 1 And vi.DIId = {0} Order By CreateTime", _dto.DiId);
 
                 groupVisaFeeViews = await _sqlSugar.SqlQueryable<GroupVisaFeeView>(groupVisaFeeSql).ToListAsync();
 
@@ -825,7 +825,7 @@ namespace OASystem.API.Controllers
                                                                  Left Join Sys_SetData sd6 On ioa.TranslateCurrency = sd6.Id
                                                                  Left Join Sys_SetData sd7 On ccp.PaymentCurrency = sd7.Id
                                                                  Left Join Sys_Users u On ccp.CreateUserId = u.Id
-                                                                 Where ioa.IsDel = 0 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And  ioa.Diid = {0} Order By CreateTime", _dto.DiId);
+                                                                 Where ioa.IsDel = 0 And ccp.IsAuditGM = 1 And  ioa.Diid = {0} Order By CreateTime", _dto.DiId);
 
                 groupInvitationalFeeViews = await _sqlSugar.SqlQueryable<GroupInvitationalFeeView>(groupInvitationalFeeSql).ToListAsync();
 
@@ -923,7 +923,7 @@ namespace OASystem.API.Controllers
                                                               Left Join Sys_SetData sd1 On ccp.PaymentCurrency = sd1.Id
                                                               Left Join Sys_SetData sd2 On ccp.PayDId = sd2.Id
                                                               Left Join Sys_Users u On ccp.CreateUserId = u.Id
-                                                              Where ic.IsDel = 0 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And ic.DiId = {0} Order By CreateTime", _dto.DiId);
+                                                              Where ic.IsDel = 0 And ccp.IsAuditGM = 1 And ic.DiId = {0} Order By CreateTime", _dto.DiId);
                 groupInsuranceFeeViews = await _sqlSugar.SqlQueryable<GroupInsuranceFeeView>(groupInsuranceFeeSql).ToListAsync();
 
                 decimal InsuranceCNYTotalPrice = 0.00M;
@@ -999,7 +999,7 @@ namespace OASystem.API.Controllers
                                                              Left Join Sys_SetData sd1 On ccp.PaymentCurrency = sd1.Id
                                                              Left Join Sys_SetData sd2 On ccp.PayDId = sd2.Id
                                                              Left Join Sys_Users u On ccp.CreateUserId = u.Id
-                                                             Where dp.IsDel = 0 And ccp.Ctable = 98 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And dp.Diid = {0} 
+                                                             Where dp.IsDel = 0 And ccp.Ctable = 98 And ccp.IsAuditGM = 1 And dp.Diid = {0} 
                                                              Order By CreateTime", _dto.DiId);
                 groupDecreaseFeeViews = await _sqlSugar.SqlQueryable<GroupDecreaseFeeView>(groupDecreaseFeeSql).ToListAsync();
 

+ 283 - 0
OASystem/OASystem.Domain/ViewModels/CompanyView.cs

@@ -68,4 +68,287 @@ namespace OASystem.Domain.ViewModels
         /// </summary>
         public string? CompanyName { get; set; }
     }
+
+
+    /// <summary>
+    /// 机票预订类
+    /// </summary>
+    public class oa2021_AirTicketReservations
+    {
+        int id;
+
+        /// <summary>
+        /// 主键编号
+        /// </summary>
+        public int Id
+        {
+            get { return id; }
+            set { id = value; }
+        }
+
+        int dIId;
+
+        /// <summary>
+        /// 团组外键编号
+        /// </summary>
+        public int DIId
+        {
+            get { return dIId; }
+            set { dIId = value; }
+        }
+        string edition;
+        /// <summary>
+        /// 版本
+        /// </summary>
+
+        public string Edition
+        {
+            get { return edition; }
+            set { edition = value; }
+        }
+
+        string flightsCode;
+
+        /// <summary>
+        /// 航班号
+        /// </summary>
+        public string FlightsCode
+        {
+            get { return flightsCode; }
+            set { flightsCode = value; }
+        }
+
+        string flightsDate;
+
+        /// <summary>
+        /// 航班日期
+        /// </summary>
+        public string FlightsDate
+        {
+            get { return flightsDate; }
+            set { flightsDate = value; }
+        }
+
+        string flightsTime;
+
+        /// <summary>
+        /// 航班时间
+        /// </summary>
+        public string FlightsTime
+        {
+            get { return flightsTime; }
+            set { flightsTime = value; }
+        }
+        string arrivedTime;
+        /// <summary>
+        /// 抵达时间
+        /// </summary>
+
+        public string ArrivedTime
+        {
+            get { return arrivedTime; }
+            set { arrivedTime = value; }
+        }
+        /// <summary>
+        /// 是否值机
+        /// </summary>
+        public string IsCheckIn { get; set; }
+        /// <summary>
+        /// 是否选座
+        /// </summary>
+        public string IsSetSeat { get; set; }
+
+        /// <summary>
+        /// 是否购买行李服务
+        /// </summary>
+        public string IsPackage { get; set; }
+        /// <summary>
+        /// 是否行李直挂
+        /// </summary>
+        public string IsBagHandle { get; set; }
+        /// <summary>
+        /// 是否火车票出票选座
+        /// </summary>
+        public string IsTrain { get; set; }
+
+
+
+
+        string flightsCity;
+
+        /// <summary>
+        /// 城市A-B
+        /// </summary>
+        public string FlightsCity
+        {
+            get { return flightsCity; }
+            set { flightsCity = value; }
+        }
+
+
+        /// <summary>
+        /// 去程航班描述代码
+        /// </summary>
+        public string LeaveDescription { get; set; }
+
+
+        /// /// <summary>
+        /// 内陆段航班描述
+        /// </summary>
+        public string FlightsDescription
+        {
+            get { return flightsDescription; }
+            set { flightsDescription = value; }
+        }
+
+        /// <summary>
+        /// 返程航班描述代码
+        /// </summary>
+        public string ReturnDescription { get; set; }
+
+        string flightsDescription;
+
+
+        int clientNum;
+        /// <summary>
+        /// 客户人数
+        /// </summary>
+        public int ClientNum
+        {
+            get { return clientNum; }
+            set { clientNum = value; }
+        }
+
+        string clientName;
+
+        /// <summary>
+        /// 客人名称
+        /// </summary>
+        public string ClientName
+        {
+            get { return clientName; }
+            set { clientName = value; }
+        }
+
+        float prePrice;
+        /// <summary>
+        /// 出票前报价
+        /// </summary>
+        public float PrePrice
+        {
+            get { return prePrice; }
+            set { prePrice = value; }
+        }
+
+        float preCurrency;
+        /// <summary>
+        /// 出票前报价币种
+        /// </summary>
+        public float PreCurrency
+        {
+            get { return preCurrency; }
+            set { preCurrency = value; }
+        }
+
+        float price;
+
+        /// <summary>
+        /// 机票全价
+        /// </summary>
+        public float Price
+        {
+            get { return price; }
+            set { price = value; }
+        }
+
+        int currency;
+
+        /// <summary>
+        /// 币种
+        /// </summary>
+        public int Currency
+        {
+            get { return currency; }
+            set { currency = value; }
+        }
+
+
+
+
+        string priceDescription;
+
+        /// <summary>
+        /// 报价说明
+        /// </summary>
+        public string PriceDescription
+        {
+            get { return priceDescription; }
+            set { priceDescription = value; }
+        }
+        /// <summary>
+        /// 机票编号
+        /// </summary>
+        public string TicketNumber { get; set; }
+        /// <summary>
+        /// 机票票号
+        /// </summary>
+        public string TicketCode { get; set; }
+        string remark;
+
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark
+        {
+            get { return remark; }
+            set { remark = value; }
+        }
+
+        int operators;
+
+        /// <summary>
+        /// 操作人
+        /// </summary>
+        public int Operators
+        {
+            get { return operators; }
+            set { operators = value; }
+        }
+
+        string operatorsDate;
+
+        /// <summary>
+        /// 操作时间
+        /// </summary>
+        public string OperatorsDate
+        {
+            get { return operatorsDate; }
+            set { operatorsDate = value; }
+        }
+
+        int isDel;
+
+        /// <summary>
+        /// 删除标识
+        /// </summary>
+        public int IsDel
+        {
+            get { return isDel; }
+            set { isDel = value; }
+        }
+        /// <summary>
+        /// 舱类型
+        /// </summary>
+        int cType;
+
+        public int CType
+        {
+            get { return cType; }
+            set { cType = value; }
+        }
+        /// <summary>
+        /// 乘客类型
+        /// </summary>
+        public string PassengerType { get; set; }
+    }
 }

+ 68 - 45
OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostRepository.cs

@@ -17,14 +17,14 @@ namespace OASystem.Infrastructure.Repositories.Groups
     /// <summary>
     /// 出入境费用 仓库
     /// </summary>
-    public class EnterExitCostRepository:BaseRepository<Grp_EnterExitCost, EnterExitCostView>
+    public class EnterExitCostRepository : BaseRepository<Grp_EnterExitCost, EnterExitCostView>
     {
         private readonly IMapper _mapper;
         private readonly SetDataRepository _setDataRep;
 
 
         public EnterExitCostRepository(SqlSugarClient sqlSugar, IMapper mapper, SetDataRepository setDataRep)
-            :base(sqlSugar) 
+            : base(sqlSugar)
         {
             _setDataRep = setDataRep;
             _mapper = mapper;
@@ -42,7 +42,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
             foreach (var item in enterExitList)
             {
-                string rateStr = string.Format(@"美元(USD):{0}|日元(JPY):{1}|欧元(EUR):{2}|英镑(GBP):{3}|港币(HKD):{4}", item.RateUSD,item.RateJPY,item.RateEUR,item.RateGBP,item.RateHKD);
+                string rateStr = string.Format(@"美元(USD):{0}|日元(JPY):{1}|欧元(EUR):{2}|英镑(GBP):{3}|港币(HKD):{4}", item.RateUSD, item.RateJPY, item.RateEUR, item.RateGBP, item.RateHKD);
                 item.CurrencyRemark = rateStr;
             }
 
@@ -51,7 +51,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 .UpdateColumns(it => new { it.CurrencyRemark })
                 .ExecuteCommandAsync();
 
-            if (res > 0) 
+            if (res > 0)
             {
                 result.Code = 0;
                 result.Msg = res.ToString();
@@ -61,7 +61,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
             return result;
         }
 
-        
+
         /// <summary>
         /// 查询 根据 Diid 查询
         /// </summary>
@@ -101,22 +101,22 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 }
                 else
                 {
-                //    List<DayAndCostInfoView> views = new List<DayAndCostInfoView>()
-                //    {
-                //            new DayAndCostInfoView {Days=1},
-                //            new DayAndCostInfoView {Days=2},
-                //            new DayAndCostInfoView {Days=3},
-                //            new DayAndCostInfoView {Days=4},
-                //            new DayAndCostInfoView {Days=5},
-                //            new DayAndCostInfoView {Days=6},
-                //            new DayAndCostInfoView {Days=7},
-                //            new DayAndCostInfoView {Days=8},
-                //    };
-                //    enterExitCostInfoView.QuarterageData = views;
-                //    enterExitCostInfoView.BoardWagesData = views;
-                //    enterExitCostInfoView.MiscellaneousFeeData = views;
-                //    enterExitCostInfoView.TrainingExpenseData = views;
-                //    result.Code = 0;
+                    //    List<DayAndCostInfoView> views = new List<DayAndCostInfoView>()
+                    //    {
+                    //            new DayAndCostInfoView {Days=1},
+                    //            new DayAndCostInfoView {Days=2},
+                    //            new DayAndCostInfoView {Days=3},
+                    //            new DayAndCostInfoView {Days=4},
+                    //            new DayAndCostInfoView {Days=5},
+                    //            new DayAndCostInfoView {Days=6},
+                    //            new DayAndCostInfoView {Days=7},
+                    //            new DayAndCostInfoView {Days=8},
+                    //    };
+                    //    enterExitCostInfoView.QuarterageData = views;
+                    //    enterExitCostInfoView.BoardWagesData = views;
+                    //    enterExitCostInfoView.MiscellaneousFeeData = views;
+                    //    enterExitCostInfoView.TrainingExpenseData = views;
+                    //    result.Code = 0;
                     result.Msg = "未查询出数据!!!";
                 }
 
@@ -124,7 +124,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
             }
             else result.Msg = ErrorMsg.Error_Port_Msg;
 
-            
+
 
             return result;
         }
@@ -135,8 +135,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
         /// <param name="dto"></param>
         /// <returns></returns>
         public async Task<Result> PostEnterExitCostOperate(EnterExitCostOperateDto dto)
-        { 
-            Result result = new Result() { Code =-1,Msg="操作失败!" };
+        {
+            Result result = new Result() { Code = -1, Msg = "操作失败!" };
 
             #region MyRegion
             //var enterExitCost = _mapper.Map<Grp_EnterExitCost>(dto);
@@ -198,6 +198,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
             //else result.Msg = ErrorMsg.Error_Port_Msg;
             #endregion
 
+            if (dto.SumJJC == 0) {
+                dto.OutsideJJPay = 0;
+            }
+            if (dto.SumGWC == 0) {
+                dto.OutsaideGWPay = 0;
+            }
+
             var enterExitCost = _mapper.Map<Grp_EnterExitCost>(dto);
             //enterExitCost.InsidePay = enterExitCost.Visa + enterExitCost.YiMiao + enterExitCost.HeSuan + enterExitCost.Service + enterExitCost.Safe + enterExitCost.Ticket;
 
@@ -231,6 +238,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 try
                 {
                     int enterExitId = 0;
+
                     if (enterExitCost.Id > 0) //修改
                     {
                         var updateId = _sqlSugar.Updateable<Grp_EnterExitCost>(enterExitCost)
@@ -260,31 +268,46 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                     if (enterExitId > 0)
                     {
+
+                        string sqlDelete = string.Format(@" Delete From Grp_DayAndCost Where Diid = {0} ", dto.DiId);
+                        await ExecuteCommandAsync(sqlDelete);
+
                         foreach (var item in subData)
                         {
-                            if (item.Id > 0) //修改
+                            var updateId = _sqlSugar.Insertable<Grp_DayAndCost>(item).ExecuteCommand();
+                            if (updateId < 1)
                             {
-                                var updateId = _sqlSugar.Updateable<Grp_DayAndCost>(item)
-                                                        .IgnoreColumns(it => new { it.DiId, it.Type, it.CreateUserId, it.CreateTime, it.IsDel })
-                                                        .ExecuteCommand();
-                                if (updateId < 1)
-                                {
-                                    _sqlSugar.RollbackTran();
-                                    result.Msg = "修改操作失败!";
-                                    return result;
-                                }
-                            }
-                            else
-                            {  //添加
-                                var updateId = _sqlSugar.Insertable<Grp_DayAndCost>(item).ExecuteCommand();
-                                if (updateId < 1)
-                                {
-                                    _sqlSugar.RollbackTran();
-                                    result.Msg = "添加操作失败!";
-                                    return result;
-                                }
+                                _sqlSugar.RollbackTran();
+                                result.Msg = "添加操作失败!";
+                                return result;
                             }
                         }
+
+                        //foreach (var item in subData)
+                        //{
+                        //    if (item.Id > 0) //修改
+                        //    {
+                        //        var updateId = _sqlSugar.Updateable<Grp_DayAndCost>(item)
+                        //                                .IgnoreColumns(it => new { it.DiId, it.Type, it.CreateUserId, it.CreateTime, it.IsDel })
+                        //                                .ExecuteCommand();
+                        //        if (updateId < 1)
+                        //        {
+                        //            _sqlSugar.RollbackTran();
+                        //            result.Msg = "修改操作失败!";
+                        //            return result;
+                        //        }
+                        //    }
+                        //    else
+                        //    {  //添加
+                        //        var updateId = _sqlSugar.Insertable<Grp_DayAndCost>(item).ExecuteCommand();
+                        //        if (updateId < 1)
+                        //        {
+                        //            _sqlSugar.RollbackTran();
+                        //            result.Msg = "添加操作失败!";
+                        //            return result;
+                        //        }
+                        //    }
+                        //}
                     }
 
                     _sqlSugar.CommitTran();
@@ -321,7 +344,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")
             };
 
-            var del = _sqlSugar.Updateable(data).UpdateColumns(it => new { it.IsDel, it.DeleteUserId,it.DeleteTime }).ExecuteCommand();
+            var del = _sqlSugar.Updateable(data).UpdateColumns(it => new { it.IsDel, it.DeleteUserId, it.DeleteTime }).ExecuteCommand();
 
             if (del > 0) result.Code = 0;
             else result.Msg = string.Format("删除失败!");