| 
					
				 | 
			
			
				@@ -65,6 +65,8 @@ using static NPOI.POIFS.Crypt.CryptoFunctions; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 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 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1346,6 +1348,14 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 var carFeeTypeItems = await _groupRepository.Query<Sys_SetData>(s => s.STid == 17 && s.IsDel == 0).ToListAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                /* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                 * 车/导游地接 费用类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var carFeeItems = await _groupRepository.Query<Sys_SetData>(s => s.STid == 83 && s.IsDel == 0).ToListAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var cityData = await _groupRepository.Query<Grp_NationalTravelFee>(s => s.IsDel == 0).ToListAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 /* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  * 用户信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1475,7 +1485,33 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                _detail.PriceNameContent = touristGuideGroundReservations.Area; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                bool isInt = int.TryParse(touristGuideGroundReservations.Area, out int cityId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                if (isInt) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    var cityInfo = cityData.Find(it => it.Id == cityId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    if (cityInfo != null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        string nameContent = $@"{cityInfo.Country}-{cityInfo.City}"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        var carFeeItem = carFeeItems.Find(it => it.Id == touristGuideGroundReservations.PriceType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        if (carFeeItem != null ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            nameContent += $@"({carFeeItem.Name})"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        _detail.PriceNameContent = nameContent; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    _detail.PriceNameContent = touristGuideGroundReservations.Area; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 List<Grp_CarTouristGuideGroundReservationsContent> touristGuideGroundReservationsContents = _CarTouristGuideGroundReservationsContent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     .Where(s => s.CTGGRId == touristGuideGroundReservations.Id && s.IsDel == 0 && s.Price != 0).ToList(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -4232,18 +4268,20 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         //总计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         decimal allPrice = dac1totalPrice + dac2totalPrice + _EnterExitCosts.Visa + _EnterExitCosts.Safe + _EnterExitCosts.Ticket; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         //国际旅费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         string outsideJJ = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         string allPriceJJ = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (_EnterExitCosts.SumJJC == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (_EnterExitCosts.SumJJC == 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             outsideJJ = string.Format(@"经济舱:{0} 元/人", _EnterExitCosts.OutsideJJPay.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             allPriceJJ = string.Format(@"经济舱:{0} 元/人", (allPrice + _EnterExitCosts.OutsideJJPay).ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         string outsideGW = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         string allPriceGW = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (_EnterExitCosts.SumGWC == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (_EnterExitCosts.SumGWC == 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             outsideGW = string.Format(@"公务舱:{0}    元/人", _EnterExitCosts.OutsaideGWPay.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             allPriceGW = string.Format(@"公务舱:{0}   元/人", (allPrice + _EnterExitCosts.OutsaideGWPay).ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -4493,6 +4531,186 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         return Ok(JsonView(true, "成功", new { Url = url })); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    else if (dto.SubTypeId == 1066) //成都市因公临时出国任务和预算审批意见表(外专培训团专用) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //获取模板 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        string tempPath = (AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/Temp/成都市因公临时出国任务和预算审批意见表.docx"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //载入模板 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        Document doc = new Document(tempPath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        DocumentBuilder builder = new DocumentBuilder(doc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        Dictionary<string, string> dic = new Dictionary<string, string>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("GroupName", _DelegationInfo.TeamName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("ClientUnit", _DelegationInfo.ClientUnit); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        string missionLeader = "";  //团负责人默认接团客户名单第一个人 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        string missionLeaderJob = "";//负责人job 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        int groupNumber = 0; //团人数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (DeleClientList.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            missionLeader = DeleClientList[0]?.Name ?? ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            missionLeaderJob = DeleClientList[0]?.Job ?? ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("MissionLeader", missionLeader); //团负责人 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("MissionLeaderJob", missionLeaderJob); //团负责人job 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("GroupNumber", _DelegationInfo.VisitPNumber.ToString()); //团人数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        #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 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //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()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("Day", _DelegationInfo.VisitDays.ToString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("CultivateDay", dac4.Count.ToString()); //培训天数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                                     // dic.Add("VisitCountry", _DelegationInfo.VisitCountry); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        NodeCollection allTables = doc.GetChildNodes(NodeType.Table, true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        Aspose.Words.Tables.Table table1 = allTables[0] as Aspose.Words.Tables.Table; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //培训人员名单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        int cultivateRowIndex = 7; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        foreach (var item in DeleClientList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.MoveToCell(0, cultivateRowIndex, 0, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.Write(item.Name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.MoveToCell(0, cultivateRowIndex, 1, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.Write(item.Sex == 0 ? "男" : item.Sex == 1 ? "女" : ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.MoveToCell(0, cultivateRowIndex, 2, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            string birthDay = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (item.Birthday != null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                DateTime dt = Convert.ToDateTime(item.Birthday); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                birthDay = $"{dt.Year}.{dt.Month}"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.Write(birthDay); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.MoveToCell(0, cultivateRowIndex, 3, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.Write(item.Company); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.MoveToCell(0, cultivateRowIndex, 4, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.Write(item.Job); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            cultivateRowIndex++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //删除多余行 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //cultivateRowIndex -= 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        int delRows = 10 + 7  - cultivateRowIndex; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (delRows > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            for (int i = 0; i < delRows; i++) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                table1.Rows.RemoveAt(cultivateRowIndex); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                //cultivateRowIndex++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        decimal hotelFeeTotal = dac1.Sum(it => it.SubTotal);//住宿费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("HotelFeeTotal", hotelFeeTotal.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        decimal mealsFeeTotal = dac2.Sum(it => it.SubTotal);//伙食费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("MealsFeeTotal", mealsFeeTotal.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        decimal miscellaneousFeeTotal = dac3.Sum(it => it.SubTotal);//公杂费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("MiscellaneousFeeTotal", miscellaneousFeeTotal.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        decimal trainingFeeTotal = dac4.Sum(it => it.SubTotal);//培训费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("TrainingFeeTotal", trainingFeeTotal.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        decimal cityTranfficFeeToatal = _EnterExitCosts.CityTranffic; //城市区间交通费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("CityTranfficFeeToatal", cityTranfficFeeToatal.ToString("#0.00"));// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //其他费用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        decimal otherFeeTotal = _EnterExitCosts.Visa + _EnterExitCosts.Safe + _EnterExitCosts.Ticket + _EnterExitCosts.YiMiao + _EnterExitCosts.HeSuan+ _EnterExitCosts.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        dic.Add("OtherFeeTotal", otherFeeTotal.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //其他费用合计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        decimal _otherFeeTotal = hotelFeeTotal + mealsFeeTotal + miscellaneousFeeTotal + trainingFeeTotal + cityTranfficFeeToatal + otherFeeTotal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        decimal _jjcFeeToatal = _EnterExitCosts.AirJJ + _otherFeeTotal; //经济舱 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        decimal _gwcFeeToatal = _EnterExitCosts.AirGW + _otherFeeTotal; //公务舱 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //公务舱合计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //国际旅费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        string outsideJJ = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        string allPriceJJ = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (_EnterExitCosts.SumJJC == 1 && _EnterExitCosts.SumGWC == 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            dic.Add("AirFeeTotal", _EnterExitCosts.AirJJ.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            dic.Add("FeeTotal", _jjcFeeToatal.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (_EnterExitCosts.SumGWC == 1 && _EnterExitCosts.SumJJC == 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            dic.Add("AirFeeTotal", _EnterExitCosts.AirGW.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            dic.Add("FeeTotal", _gwcFeeToatal.ToString("#0.00")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (_EnterExitCosts.SumJJC == 1 && _EnterExitCosts.SumGWC == 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            string airFeeTotalStr = string.Format(@$"经济舱:{_EnterExitCosts.AirJJ.ToString("#0.00")} 公务舱:{_EnterExitCosts.AirGW.ToString("#0.00")}"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            dic.Add("AirFeeTotal", airFeeTotalStr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            string feeTotalStr = string.Format(@$"经济舱:{_jjcFeeToatal.ToString("#0.00")} 公务舱:{_gwcFeeToatal.ToString("#0.00")}"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            dic.Add("FeeTotal", feeTotalStr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        foreach (var key in dic.Keys) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.MoveToBookmark(key); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            builder.Write(dic[key]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //模板文件名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        string strFileName = $"{_DelegationInfo.TeamName}成都市因公临时出国任务和预算审批意见表(外专培训团专用).docx"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        doc.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        return Ok(JsonView(true, "成功", new { Url = url })); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 else if (dto.ExportType == 2) //表格 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -10258,13 +10476,9 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             if (clientInfo == null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                string format1 = "yyyy-MM-dd"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                string data111 = "1990-01-01"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                var data11_1 = IsValidDate(item.Birthday, format1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                if (data11_1) data111 = item.OPdate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                DateTime? dateTime = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                var isDt = DateTime.TryParse(item.Birthday, out DateTime birthDayDt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                if (isDt) dateTime = birthDayDt; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 var addInfo1 = new Crm_DeleClient() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -10278,8 +10492,7 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     Marriage = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     Phone = item.Phone, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     Job = item.Job, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    BirthDay = Convert.ToDateTime(data111).ToString("yyyy-MM-dd"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    BirthDay = dateTime 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -10864,8 +11077,8 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dic.Add("SQtime", info1.ApprovalDt.ConvertToDatetime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dic.Add("SQRemark", info1.ApprovalRemark); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            dic.Add("CPJtime", info1.ApprovalDt.ConvertToDatetime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            dic.Add("CPJRemark", info1.ApprovalRemark); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dic.Add("CPJtime", info1.IssueApprovalDt.ConvertToDatetime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dic.Add("CPJRemark", info1.IssueApprovalRemark); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //dic.Add("HZtime", info1.ApplyPassportDt.ConvertToDatetime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //dic.Add("HZRemark", info1.ApplyPassportRemark); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -10912,16 +11125,9 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// <returns></returns> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [HttpPost] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        public async Task<IActionResult> ChangeDataBase_Offi(PostTourClientListDownloadFile _dto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public async Task<IActionResult> Test_SendMsg(PostTourClientListDownloadFile _dto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _airTicketResRep.ChangeDataBase(DBEnum.OA2014DB); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            string sqlOld = string.Format(@" Select * From AirTicketReservations With(nolock) "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<oa2021_AirTicketReservations> listOld = _airTicketResRep._sqlSugar.SqlQueryable<oa2021_AirTicketReservations>(sqlOld).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _airTicketResRep.ChangeDataBase(DBEnum.OA2023DB); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            DeleReminderMessage.PostMessageByWebhook(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return Ok(JsonView(true, "操作成功!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 |