Pārlūkot izejas kodu

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

jiangjc 1 gadu atpakaļ
vecāks
revīzija
f5d80f9af6

+ 7 - 5
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -8412,7 +8412,8 @@ namespace OASystem.API.Controllers
 
                 foreach (var item in _GroupCostParameters)
                 {
-                    decimal _rate = item.Rate;
+                    decimal _rate = 1;
+                    decimal _rate1 = item.Rate;
                     decimal _scale = 0.95M;
                     #region 处理地接价格比例 总经理 国交部经理 主管 不下调 其他人 下调 5% 
                     var userInfo = _usersRep._sqlSugar.Queryable<Sys_Users>().Where(it => it.IsDel == 0 && it.Id == dto.UserId).First();
@@ -8432,7 +8433,7 @@ namespace OASystem.API.Controllers
                     GroupCostModulePromptInfo modulePromptInfo = new GroupCostModulePromptInfo()
                     {
                         CurrencyCode = currCode,
-                        Rate = _rate,
+                        Rate = _rate1,
                         CostType = item.CostType,
                         CostTypeStartTime = Convert.ToDateTime(item.CostTypeStartTime).ToString("yyyy-MM-dd"),
                         CostTypeEndTime = Convert.ToDateTime(item.CostTypeendTime).ToString("yyyy-MM-dd"),
@@ -10827,12 +10828,12 @@ namespace OASystem.API.Controllers
         public async Task<IActionResult> PostInvertedListFileDownload(InvertedListFileDownloadDto dto)
         {
 
-            var info1 = await _invertedListRep._sqlSugar.Queryable<Grp_InvertedList>().Where(it => it.IsDel == 0 && it.DiId == dto.DiId).FirstAsync();
-            if (info1 == null)
+            var info2 = await _invertedListRep._Info(1, dto.DiId);
+            if (info2.Code != 0)
             {
                 return Ok(JsonView(false, "倒推表数据未生成,请先生成倒退表数据!"));
             }
-
+            var info1 = info2.Data as InvertedListInfoView;
             var info = await _invertedListRep._sqlSugar.Queryable<Grp_DelegationInfo>().Where(it => it.Id == dto.DiId).FirstAsync();
             string teamName = "";
             if (info != null) teamName = info.TeamName;
@@ -10863,6 +10864,7 @@ namespace OASystem.API.Controllers
             dic.Add("QZRemark", info1.VisaInformationRemark);
 
             dic.Add("SQQZtime", info1.SendVisaDt.ConvertToDatetime());
+
             dic.Add("SQQZRemark", info1.SendVisaRemark);
 
             dic.Add("CQtime", info1.IssueVisaDt.ConvertToDatetime());

+ 2 - 2
OASystem/OASystem.Domain/Entities/Groups/Grp_GroupCost.cs

@@ -127,11 +127,11 @@ namespace OASystem.Domain.Entities.Groups
             set { tgn = value; }
         }
 
+
+        decimal tgof;
         /// <summary>
         /// 导游超时费用
         /// </summary>
-        decimal tgof;
-
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal TGOF
         {

+ 33 - 8
OASystem/OASystem.Infrastructure/Repositories/Groups/InvertedListRepository.cs

@@ -106,28 +106,53 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     visitCountry = grpVisitCountry.Split("、").ToList();
                 }
 
+                string sqqzRemark = "";
+
 
                 //签证费用标准
                 var visaFeeDatas = await _sqlSugar.Queryable<Res_CountryFeeCost>().Where(it => it.IsDel == 0).ToListAsync();
                 List<VisaCountryInfo> visaCountryInfos = new List<VisaCountryInfo>();
 
-                foreach (var itemn in visitCountry) 
+                string countryStr = "";
+                string countryDesc = "";
+                foreach (var item in visitCountry)
                 {
-                    visaCountryInfos.Add(new VisaCountryInfo() { 
-                    
-                        Country = itemn,
-                        OfficialTypeId=-1,
+
+                    int visaDays = Convert.ToInt32(visaFeeDatas.Find(it => it.VisaCountry.Equals(item.Trim()))?.VisaTime ?? "0");
+                    visaCountryInfos.Add(new VisaCountryInfo()
+                    {
+                        Country = item,
+                        OfficialTypeId = -1,
                         VisaTypeId = -1,
-                        VisaDay = Convert.ToInt32(visaFeeDatas.Find(it => it.VisaCountry.Equals(itemn.Trim()))?.VisaTime ?? "0"),
+                        VisaDay = visaDays
                     });
+
+                    countryStr += $"{item}、";
+                    countryDesc += $"{item}签证{visaDays}个工作日,";
+                }
+
+                if (countryStr.Length > 0)
+                {
+                    countryStr = countryStr.Substring(0, countryStr.Length - 1);
+                }
+
+                if (countryDesc.Length > 0)
+                {
+                    countryDesc = countryDesc.Substring(0, countryDesc.Length - 1);
                 }
+
+                sqqzRemark = $"申请{countryStr}签证;{countryDesc}\r\n(签证周期仅供参考)";
+
                 info.VisaCountryData = visaCountryInfos;
+                info.SendVisaRemark = sqqzRemark;
                 _result.Data = info;
                 _result.Msg = "未查询到数据!";
                 _result.Code = 0;
                 return _result; 
             }
 
+           
+
             int ilId = info.Id;
 
             string visaSql = string.Format(@$"Select * From Grp_InvertedListVisaCountry Where Isdel={0} And ILId = {ilId}");
@@ -258,8 +283,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
             return _result;
         }
 
-
-
         /// <summary>
         /// Update
         /// </summary>
@@ -318,5 +341,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
             _result.Msg = @$"操作成功!";
             return _result;
         }
+    
+    
     }
 }