Browse Source

1、团组商邀公务 --> 公务出访 --> 省、市外办请示文件下载 --> 新增黑屏代码、国家验证

LEIYI 10 months ago
parent
commit
f83f19efae
1 changed files with 2 additions and 3 deletions
  1. 2 3
      OASystem/OASystem.Api/Controllers/ResourceController.cs

+ 2 - 3
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -2365,17 +2365,16 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
                  */
 
                 string taskStr = string.Empty ;
-                List<string> countrys = obDatas.Select(it => it.Country).ToList();
+                List<string> countrys = obDatas.Where(it => !string.IsNullOrEmpty(it.Country)).Select(it => it.Country).ToList();
                 int countryIndex = 1;
                 foreach (var item in countrys)
                 {
-
                     string taskTitle = $"({GetToUpperNumber(countryIndex)}){item ?? "[公务出访国家未填写]"}\r\n";
 
                     string taskContent = "";
                     if (!string.IsNullOrEmpty(item))
                     {
-                        var countryObDatas = obDatas.Where(it => it.Country.Contains(item)).OrderBy(it => it.Date).ToList();
+                        var countryObDatas = obDatas.Where(it => !string.IsNullOrEmpty(it.Country) && it.Country.Contains(item)).OrderBy(it => it.Date).ToList();
                         int obIndex = 1;
                         if (countryObDatas.Count == 0) taskContent = "[公务出访未录入]\r\n";
                         else