Browse Source

倒推表模板调整1

leiy 10 months ago
parent
commit
c23e65c1ab

+ 1 - 28
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -10865,34 +10865,7 @@ namespace OASystem.API.Controllers
 
             dic.Add("SQQZtime", info1.SendVisaDt.ConvertToDatetime());
 
-            string sqqzRemark = "";
-            if (info1.VisaCountryData.Count > 0)
-            {
-                string countryStr = "";
-                string countryDesc = "";
-                foreach (var item in info1.VisaCountryData)
-                {
-                    countryStr += $"{item.Country}、";
-                    countryDesc += $"{item.Country}签证{item.VisaDay}个工作日,";
-                }
-
-                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}";
-
-            }
-            
-
-            dic.Add("SQQZRemark", sqqzRemark);
+            dic.Add("SQQZRemark", info1.SendVisaRemark);
 
             dic.Add("CQtime", info1.IssueVisaDt.ConvertToDatetime());
             dic.Add("CQRemark", info1.IssueVisaRemark);

+ 31 - 6
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}");