Browse Source

公务出访
1 列表增加时间
2 添加修改 特殊字符处理

leiy 10 months ago
parent
commit
f4e1b6c137

+ 26 - 6
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -3632,17 +3632,37 @@ namespace OASystem.API.Controllers
             try
             try
             {
             {
                 var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>().FirstAsync(it => it.Id == dto.DiId && it.IsDel == 0);
                 var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>().FirstAsync(it => it.Id == dto.DiId && it.IsDel == 0);
-                dynamic visaInfo;
+
+                //签证费用 tips
+                List<dynamic> visaInfo = new List<dynamic>();
                 if (groupInfo != null)
                 if (groupInfo != null)
                 {
                 {
                     List<string> countrys = _groupRepository.GroupSplitCountry(groupInfo.VisitCountry);
                     List<string> countrys = _groupRepository.GroupSplitCountry(groupInfo.VisitCountry);
                     if (countrys.Count > 0)
                     if (countrys.Count > 0)
                     {
                     {
-                        var countryVisaFees = await _sqlSugar.Queryable<Res_CountryFeeCost>().ToListAsync(it => it.IsDel == 0 && countrys.Contains(it.VisaCountry));
-
-
-
-
+                        foreach (var item in countrys)
+                        {
+                            var countryVisaFees = _sqlSugar.Queryable<Res_CountryFeeCost>().First(it => it.IsDel == 0 && countrys.Contains(it.VisaCountry));
+                            if (countryVisaFees != null)
+                            {
+                                visaInfo.Add(new { 
+                                    isExist = true,
+                                    country = item,
+                                    visaFee = countryVisaFees.VisaPrice,
+                                    lastUpdateDt = countryVisaFees.LastUpdateTime
+                                });
+                            }
+                            else
+                            {
+                                visaInfo.Add(new
+                                {
+                                    isExist = false,
+                                    country = $"“{item}”未在签证费用模块录入!",
+                                    visaFee = 0.00M,
+                                    lastUpdateDt = ""
+                                });
+                            }
+                        }
                     }
                     }
                 }
                 }
 
 

+ 17 - 1
OASystem/OASystem.Infrastructure/Repositories/Resource/OfficialActivitiesRepository.cs

@@ -55,11 +55,15 @@ namespace OASystem.Infrastructure.Repositories.Resource
                         foreach (var temp in OfficialActivities)
                         foreach (var temp in OfficialActivities)
                         {
                         {
                             //2024年4月1日 11:55:44  -蒋金辰 -日期处理
                             //2024年4月1日 11:55:44  -蒋金辰 -日期处理
+                           
                             DateTime dt;
                             DateTime dt;
                             bool b_dt = DateTime.TryParse(temp.Date, out dt);
                             bool b_dt = DateTime.TryParse(temp.Date, out dt);
                             if (b_dt)
                             if (b_dt)
                             {
                             {
-                                temp.Date = dt.ToString("yyyy-MM-dd HH:mm");
+
+                                if (!string.IsNullOrEmpty(temp.Time)) temp.Date = dt.ToString("yyyy-MM-dd") + " " + temp.Time;
+                                else temp.Date = dt.ToString("yyyy-MM-dd HH:mm:ss");
+
                             }
                             }
 
 
                             //2024年4月26日 17:43  -蒋金辰 -出访形式
                             //2024年4月26日 17:43  -蒋金辰 -出访形式
@@ -174,6 +178,18 @@ namespace OASystem.Infrastructure.Repositories.Resource
             Result result = new Result() { Code = -2, Msg = "未知错误" };
             Result result = new Result() { Code = -2, Msg = "未知错误" };
             try
             try
             {
             {
+                #region 特殊字符转码  037 - 4.28 15:17
+
+                if (!string.IsNullOrEmpty(dto.Contact))
+                {
+                    byte[] utf8Bytes = Encoding.UTF8.GetBytes(dto.Contact);
+                    byte[] utf16Bytes = Encoding.Convert(Encoding.UTF8, Encoding.Unicode, utf8Bytes);
+                    dto.Contact = Encoding.Unicode.GetString(utf16Bytes);
+                }
+                
+                #endregion
+
+
                 if (dto.Status == 1)//添加
                 if (dto.Status == 1)//添加
                 {
                 {
                     _sqlSugar.BeginTran();
                     _sqlSugar.BeginTran();