|
@@ -66,6 +66,7 @@ using Aspose.Words.Lists;
|
|
|
using OASystem.API.OAMethodLib.YouDaoAPI;
|
|
|
using NPOI.XSSF.Streaming.Values;
|
|
|
using OASystem.API.OAMethodLib.Quartz.Business;
|
|
|
+using System.Linq;
|
|
|
|
|
|
namespace OASystem.API.Controllers
|
|
|
{
|
|
@@ -4556,47 +4557,55 @@ namespace OASystem.API.Controllers
|
|
|
dic.Add("MissionLeaderJob", missionLeaderJob); //团负责人job
|
|
|
dic.Add("GroupNumber", _DelegationInfo.VisitPNumber.ToString()); //团人数
|
|
|
|
|
|
- if (blackCode != null && !string.IsNullOrWhiteSpace(blackCode.BlackCode))
|
|
|
- {
|
|
|
- List<string> list = new List<string>();
|
|
|
- try
|
|
|
- {
|
|
|
- var spilitArr = Regex.Split(blackCode.BlackCode, "\r\n");
|
|
|
- foreach (var item in spilitArr)
|
|
|
- {
|
|
|
- var spDotandEmpty = item.Split('.')[1].Split(' ').Where(x => !string.IsNullOrEmpty(x)).ToList();
|
|
|
- var depCode = spDotandEmpty[2].Substring(0, 3);
|
|
|
- var arrCode = spDotandEmpty[2].Substring(3, 3);
|
|
|
- string depName = threeCodes.Find(it => it.Three.Equals(depCode)).City,
|
|
|
- arrName = threeCodes.Find(it => it.Three.Equals(arrCode)).City;
|
|
|
|
|
|
- list.Add(depName);
|
|
|
- list.Add(arrName);
|
|
|
- }
|
|
|
+ #region MyRegion
|
|
|
+ //if (blackCode != null && !string.IsNullOrWhiteSpace(blackCode.BlackCode))
|
|
|
+ //{
|
|
|
+ // List<string> list = new List<string>();
|
|
|
+ // try
|
|
|
+ // {
|
|
|
+ // var spilitArr = Regex.Split(blackCode.BlackCode, "\r\n");
|
|
|
+ // foreach (var item in spilitArr)
|
|
|
+ // {
|
|
|
+ // var spDotandEmpty = item.Split('.')[1].Split(' ').Where(x => !string.IsNullOrEmpty(x)).ToList();
|
|
|
+ // var depCode = spDotandEmpty[2].Substring(0, 3);
|
|
|
+ // var arrCode = spDotandEmpty[2].Substring(3, 3);
|
|
|
+ // string depName = threeCodes.Find(it => it.Three.Equals(depCode)).City,
|
|
|
+ // arrName = threeCodes.Find(it => it.Three.Equals(arrCode)).City;
|
|
|
+
|
|
|
+ // list.Add(depName);
|
|
|
+ // list.Add(arrName);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // list = list.Distinct().ToList();
|
|
|
+ // dic.Add("ReturnCode", string.Join("-", list).TrimEnd('-'));
|
|
|
+ // }
|
|
|
+ // catch (Exception)
|
|
|
+ // {
|
|
|
+ // dic.Add("ReturnCode", "行程录入不正确!");
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // dic.Add("ReturnCode", "未录入行程!");
|
|
|
+ //}
|
|
|
+
|
|
|
+ List<string> countrys = _groupRepository.GroupSplitCountry(_DelegationInfo.VisitCountry);
|
|
|
+ dic.Add("ReturnCode", string.Join( "、", countrys));
|
|
|
+ #endregion
|
|
|
|
|
|
- list = list.Distinct().ToList();
|
|
|
- dic.Add("ReturnCode", string.Join("-", list).TrimEnd('-'));
|
|
|
- }
|
|
|
- catch (Exception)
|
|
|
- {
|
|
|
- dic.Add("ReturnCode", "行程录入不正确!");
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- dic.Add("ReturnCode", "未录入行程!");
|
|
|
- }
|
|
|
|
|
|
//dic.Add("ReturnCodeAir", dic["ReturnCode"]);
|
|
|
//dic.Add("VisitStartDate", _DelegationInfo.VisitStartDate.ToString("yyyy年MM月dd日"));
|
|
|
//dic.Add("VisitEndDate", _DelegationInfo.VisitEndDate.ToString("yyyy年MM月dd日"));
|
|
|
|
|
|
- if (dic.ContainsKey("VisitStartDate") && dic.ContainsKey("VisitEndDate"))
|
|
|
- {
|
|
|
- TimeSpan sp = _DelegationInfo.VisitEndDate.Subtract(_DelegationInfo.VisitStartDate);
|
|
|
- dic.Add("Day", sp.Days.ToString());
|
|
|
+ //if (dic.ContainsKey("VisitStartDate") && dic.ContainsKey("VisitEndDate"))
|
|
|
+ //{
|
|
|
+ // TimeSpan sp = _DelegationInfo.VisitEndDate.Subtract(_DelegationInfo.VisitStartDate);
|
|
|
+ // dic.Add("Day", sp.Days.ToString());
|
|
|
|
|
|
- }
|
|
|
+ //}
|
|
|
+ dic.Add("Day", _DelegationInfo.VisitDays.ToString());
|
|
|
|
|
|
dic.Add("CultivateDay", dac4.Count.ToString()); //培训天数
|
|
|
// dic.Add("VisitCountry", _DelegationInfo.VisitCountry);
|