|
|
@@ -1983,7 +1983,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
string sexStr = string.Empty;
|
|
|
if (sex == 0) sexStr = "男";
|
|
|
else if (sex == 1) sexStr = "女";
|
|
|
- else sexStr = "未设置";
|
|
|
+ else sexStr = "-";
|
|
|
builder.Write(sexStr);
|
|
|
|
|
|
builder.MoveToCell(0, i + 1, 2, 0);
|
|
|
@@ -2007,7 +2007,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
}
|
|
|
|
|
|
var fileDir = AppSettingsHelper.Get("WordBasePath");
|
|
|
- string fileName = $"{groupInfo.TeamName}省外办出访请示.docx";
|
|
|
+ string fileName = $"{groupInfo.TeamName}省外办出访请示{DateTime.Now.ToString("yyyyMMddHHmmss")}.docx";
|
|
|
string filePath = fileDir + $@"OfficialActivities/{fileName}";
|
|
|
doc.Save(filePath);
|
|
|
|
|
|
@@ -2057,7 +2057,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
{
|
|
|
obInfoStr = obInfoStr.Substring(0, obInfoStr.Length - 1);
|
|
|
}
|
|
|
- string reqSubTitle = $@"应{obInfoStr}的邀请,我单位拟派{guestInfoStr}等{guestInfos.Count}人于{visitDateStr}赴{groupInfo.VisitCountry}进行{groupInfo.VisitPurpose}。";
|
|
|
+ string reqSubTitle = $@"应{obInfoStr.Trim()}的邀请,我单位拟派{guestInfoStr.Trim()}等{guestInfos.Count}人于{visitDateStr}赴{groupInfo.VisitCountry}进行{groupInfo.VisitPurpose}。";
|
|
|
dic.Add("ReqSubTitle", reqSubTitle);
|
|
|
|
|
|
/*
|
|
|
@@ -2067,26 +2067,35 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
* 2.拜访×××(机构名称)×××(姓名、职务)洽谈(或调研等)×××(项目或机构名称等)。(例:拜会友城×××市市长×××,巩固和发展两市传统友谊,商谈两市未来互动交流合作项目。)背景:拟拜访机构的优势、拟洽谈项目的前期进展情况等。(例:背景:×××年×月,×××市与×××市正式缔结友好城市关系。在此框架下,两市开展了一系列友好互访和商务交流。并于×××年×月共同举办了“×××活动”。)
|
|
|
*
|
|
|
*/
|
|
|
-
|
|
|
- string taskStr = "××××"; ;
|
|
|
- //List<string> countrys = groupInfo.VisitCountry.Split("、").ToList();
|
|
|
- //int countryIndex = 1;
|
|
|
- //foreach (var item in countrys)
|
|
|
- //{
|
|
|
- // string taskTitle = $"({GetToUpperNumber(countryIndex)}){item}\r\n";
|
|
|
+ string visitCountryStr1 = ""; // ××国家(或地区)×天,××国家(或地区)×天
|
|
|
+ string taskStr = string.Empty ;
|
|
|
+ List<string> countrys = obDatas.Select(it => it.Country).ToList();
|
|
|
+ int countryIndex = 1;
|
|
|
+ foreach (var item in countrys)
|
|
|
+ {
|
|
|
+ visitCountryStr1 += $"{item} 天,";
|
|
|
+ string taskTitle = $"({GetToUpperNumber(countryIndex)}){item ?? "[公务出访国家未填写]"}\r\n";
|
|
|
+
|
|
|
+ string taskContent = "";
|
|
|
+ var countryObDatas = obDatas.Where(it => it.Country.Contains(item)).OrderBy(it => it.Date).ToList();
|
|
|
+ int obIndex = 1;
|
|
|
+ if (countryObDatas.Count == 0) taskContent = "[公务出访未录入]\r\n";
|
|
|
+ else
|
|
|
+ {
|
|
|
+ foreach (var obInfo in countryObDatas)
|
|
|
+ {
|
|
|
+ taskContent += $"{obIndex}.{obInfo.ReqSample ?? "[公务出访请示范例未填写]"}\r\n背景:{obInfo.Setting ?? "[公务出访背景未填写]"}\r\n";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- // string taskContent = "";
|
|
|
- // var countryObDatas = obDatas.Where(it => it.Client.Contains(item)).ToList();
|
|
|
- // int obIndex = 1;
|
|
|
- // foreach (var obInfo in countryObDatas)
|
|
|
- // {
|
|
|
- // taskContent += $"{obIndex}. 拜访{obInfo.Client}({obInfo.Contact}、{obInfo.Job})洽谈“{groupInfo.VisitPurpose}”相关工作。\r\n";
|
|
|
- // }
|
|
|
+ taskStr += $"{taskTitle}{taskContent}";
|
|
|
|
|
|
- // taskStr += $"{taskTitle}{taskContent}";
|
|
|
+ countryIndex++;
|
|
|
+ }
|
|
|
|
|
|
- // countryIndex++;
|
|
|
- //}
|
|
|
+ if (string.IsNullOrEmpty(taskStr)) taskStr = "××××××";
|
|
|
+ if (visitCountryStr1.Length > 0) visitCountryStr1 = visitCountryStr1.Substring(0, visitCountryStr1.Length - 1);
|
|
|
|
|
|
//出访任务
|
|
|
dic.Add("TaskContent", taskStr);
|
|
|
@@ -2100,6 +2109,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
string tripInfoStr = "";
|
|
|
string visitCountryStr = $"[OP行程单读取]";
|
|
|
visitCountryStr = GeneralMethod.GetCountryStandingTime(groupInfo.Id); //计算国家出访天数
|
|
|
+ if (visitCountryStr.Equals("[黑屏代码未录入]")) visitCountryStr = visitCountryStr1;
|
|
|
string lineStr = GeneralMethod.GetGroupCityLine(groupInfo.Id, "—"); //出访路线
|
|
|
tripInfoStr = $"代表团拟于{groupInfo.VisitStartDate.Year}年{groupInfo.VisitStartDate.Month}月{groupInfo.VisitStartDate.Day}日—{groupInfo.VisitEndDate.Month}月{groupInfo.VisitEndDate.Day}日出访,在外停留{groupInfo.VisitDays}天。其中,{visitCountryStr}。出访路线:{lineStr}出访费用:由××承担(注明由外方或上级机关承担,还是由派员单位在年度安排的预算经费中列支)";
|
|
|
|
|
|
@@ -2142,11 +2152,11 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
|
|
|
|
|
|
builder.MoveToCell(0, i + 1, 3, 0);
|
|
|
- string birthDay = "";
|
|
|
+ DateTime birthDay = guestInfo.BirthDay;
|
|
|
string birthDayStr = string.Empty;
|
|
|
- if (!string.IsNullOrEmpty(birthDay))
|
|
|
+ if (birthDay != null)
|
|
|
{
|
|
|
- birthDayStr = Convert.ToDateTime(birthDay).ToString("yyyy.MM");
|
|
|
+ birthDayStr = birthDay.ToString("yyyy.MM");
|
|
|
}
|
|
|
builder.Write(birthDayStr);
|
|
|
}
|
|
|
@@ -2158,7 +2168,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
}
|
|
|
|
|
|
var fileDir = AppSettingsHelper.Get("WordBasePath");
|
|
|
- string fileName = $"{groupInfo.TeamName}市外办出访请示.docx";
|
|
|
+ string fileName = $"{groupInfo.TeamName}市外办出访请示{DateTime.Now.ToString("yyyyMMddHHmmss")}.docx";
|
|
|
string filePath = fileDir + $@"OfficialActivities/{fileName}";
|
|
|
doc.Save(filePath);
|
|
|
|