|  | @@ -5320,7 +5320,7 @@ FROM
 | 
	
		
			
				|  |  |                                                  2 表格 --> 1008(派员单位出(境)任务和预算审批意见表) 1009(省级单位出(境)经费报销单)
 | 
	
		
			
				|  |  |                                                  3 团组成员名单 1 团组成员名单", ""));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                var _EnterExitCosts = _sqlSugar.Queryable<Grp_EnterExitCost>().Where(it => it.IsDel == 0 && it.DiId == dto.DiId).First();
 | 
	
		
			
				|  |  | +                var _EnterExitCosts = _sqlSugar.Queryable<Grp_EnterExitCost>().Where(it => it.IsDel == 0 && it.DiId == dto.DiId).OrderByDescending(x => x.CreateTime).First();
 | 
	
		
			
				|  |  |                  var _DayAndCosts = _sqlSugar.Queryable<Grp_DayAndCost>().Where(it => it.IsDel == 0 && it.DiId == dto.DiId).ToList();
 | 
	
		
			
				|  |  |                  if (_EnterExitCosts == null) return Ok(JsonView(400, "该团组未填写出入境费用;", ""));
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -5388,13 +5388,12 @@ FROM
 | 
	
		
			
				|  |  |                          //利用键值对存放数据
 | 
	
		
			
				|  |  |                          Dictionary<string, string> dic = new Dictionary<string, string>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                        decimal stayFeeTotal = _DayAndCosts.Where(it => it.Type == 1).Sum(it => it.SubTotal);  // 住宿费
 | 
	
		
			
				|  |  | -                        decimal mealsFeeTotal = _DayAndCosts.Where(it => it.Type == 2).Sum(it => it.SubTotal);  // 伙食费费
 | 
	
		
			
				|  |  | -                        decimal miscellaneousFeeTotal = _DayAndCosts.Where(it => it.Type == 3).Sum(it => it.SubTotal);  // 公杂费
 | 
	
		
			
				|  |  | -                        decimal tainFeeTotal = _DayAndCosts.Where(it => it.Type == 4).Sum(it => it.SubTotal);  // 培训费
 | 
	
		
			
				|  |  | -                        decimal otherPriceTotal = dac5.Sum(x => x.SubTotal); //其他费用
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                        decimal insidePayTotal = _EnterExitCosts.InsidePay;
 | 
	
		
			
				|  |  | +                        decimal stayFeeTotal = _EnterExitCosts.ChoiceThree == 1 ? _DayAndCosts.Where(it => it.Type == 1).Sum(it => it.SubTotal) : 0.00M;  // 住宿费
 | 
	
		
			
				|  |  | +                        decimal mealsFeeTotal = _EnterExitCosts.ChoiceFour == 1 ? _DayAndCosts.Where(it => it.Type == 2).Sum(it => it.SubTotal) : 0.00M;  // 伙食费费
 | 
	
		
			
				|  |  | +                        decimal miscellaneousFeeTotal = _EnterExitCosts.ChoiceFive == 1 ? _DayAndCosts.Where(it => it.Type == 3).Sum(it => it.SubTotal) : 0.00M; // 公杂费
 | 
	
		
			
				|  |  | +                        decimal tainFeeTotal = _EnterExitCosts.ChoiceSix == 1 ? _DayAndCosts.Where(it => it.Type == 4).Sum(it => it.SubTotal) : 0.00M;  // 培训费
 | 
	
		
			
				|  |  | +                        decimal otherPriceTotal = _EnterExitCosts.OtherExpenses_Checked == 1 ? dac5.Sum(x => x.SubTotal) : 0.00M; //其他费用
 | 
	
		
			
				|  |  | +                        decimal insidePayTotal = _EnterExitCosts.ChoiceOne == 1 ? _EnterExitCosts.InsidePay : 0.00M;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                          //境内费用(其他费用)
 | 
	
		
			
				|  |  |                          if (_EnterExitCosts.ChoiceOne == 1)
 | 
	
	
		
			
				|  | @@ -7143,25 +7142,13 @@ FROM
 | 
	
		
			
				|  |  |          #region 团组经理模块 出入境费用 移动端(Android/IOS)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
		
			
				|  |  | -        /// 团组模块 - 出入境费用-移动端 - 基础数据源(Word明细类型、Excel明细类型、默认币种显示)
 | 
	
		
			
				|  |  | +        /// 获取币种基础数据(含逻辑处理)
 | 
	
		
			
				|  |  |          /// </summary>
 | 
	
		
			
				|  |  |          /// <returns></returns>
 | 
	
		
			
				|  |  | -        [HttpPost]
 | 
	
		
			
				|  |  | -        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
 | 
	
		
			
				|  |  | -        public async Task<IActionResult> EnterExitCostMobileDataSource(PortDtoBase dto)
 | 
	
		
			
				|  |  | +        private async Task<List<CurrencyInfo>> EnterExitCostMobileGetCurrencyInit()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            string sql = string.Format("Select * From Sys_SetData Where IsDel = 0");
 | 
	
		
			
				|  |  | -            //SetDataInfoView
 | 
	
		
			
				|  |  | -            var dataSource = await _sqlSugar.SqlQueryable<Sys_SetData>(sql).ToListAsync();
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            var wordTypeData = dataSource.Where(it => it.STid == 72).ToList();  //三公费用-Word明细类型
 | 
	
		
			
				|  |  | -            List<SetDataInfoView> _WordTypeData = _mapper.Map<List<SetDataInfoView>>(wordTypeData);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            var excelTypeData = dataSource.Where(it => it.STid == 73).ToList(); //三公费用-Excel明细类型
 | 
	
		
			
				|  |  | -            List<SetDataInfoView> _ExcelTypeData = _mapper.Map<List<SetDataInfoView>>(excelTypeData);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |              //默认币种显示
 | 
	
		
			
				|  |  | -           var _currencyInfos = _currencyInit;
 | 
	
		
			
				|  |  | +            var _currencyInfos = _currencyInit;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              var _currencyRate = await _juHeApi.PostItemRateAsync(_currencyInfos.Select(it => it.CurrencyCode).ToArray());
 | 
	
		
			
				|  |  |              if (_currencyRate.Count > 0)
 | 
	
	
		
			
				|  | @@ -7179,6 +7166,30 @@ FROM
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +            return _currencyInfos;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        /// <summary>
 | 
	
		
			
				|  |  | +        /// 团组模块 - 出入境费用-移动端 - 基础数据源(Word明细类型、Excel明细类型、默认币种显示)
 | 
	
		
			
				|  |  | +        /// </summary>
 | 
	
		
			
				|  |  | +        /// <returns></returns>
 | 
	
		
			
				|  |  | +        [HttpPost]
 | 
	
		
			
				|  |  | +        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
 | 
	
		
			
				|  |  | +        public async Task<IActionResult> EnterExitCostMobileDataSource(PortDtoBase dto)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            string sql = string.Format("Select * From Sys_SetData Where IsDel = 0");
 | 
	
		
			
				|  |  | +            //SetDataInfoView
 | 
	
		
			
				|  |  | +            var dataSource = await _sqlSugar.SqlQueryable<Sys_SetData>(sql).ToListAsync();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var wordTypeData = dataSource.Where(it => it.STid == 72).ToList();  //三公费用-Word明细类型
 | 
	
		
			
				|  |  | +            List<SetDataInfoView> _WordTypeData = _mapper.Map<List<SetDataInfoView>>(wordTypeData);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var excelTypeData = dataSource.Where(it => it.STid == 73).ToList(); //三公费用-Excel明细类型
 | 
	
		
			
				|  |  | +            List<SetDataInfoView> _ExcelTypeData = _mapper.Map<List<SetDataInfoView>>(excelTypeData);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //默认币种显示
 | 
	
		
			
				|  |  | +            var _currencyInfos = await EnterExitCostMobileGetCurrencyInit();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              return Ok(JsonView(true, "查询成功!", new
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  WordTypeData = _WordTypeData,
 | 
	
	
		
			
				|  | @@ -7408,6 +7419,7 @@ FROM
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              var mobileInfo = new EnterExitCostMobileParentInfoView();
 | 
	
		
			
				|  |  |              mobileInfo.DiId = dto.DiId;
 | 
	
		
			
				|  |  | +            mobileInfo.Currencys = await EnterExitCostMobileGetCurrencyInit();
 | 
	
		
			
				|  |  |              if (eecInfo == null) return Ok(mobileInfo);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              mobileInfo = _mapper.Map<EnterExitCostMobileParentInfoView>(eecInfo);
 | 
	
	
		
			
				|  | @@ -7435,7 +7447,7 @@ FROM
 | 
	
		
			
				|  |  |              mobileInfo.ChoiceTwoJJ = eecInfo.SumJJC;
 | 
	
		
			
				|  |  |              mobileInfo.ChoiceTwoGW = eecInfo.SumGWC;
 | 
	
		
			
				|  |  |              mobileInfo.ChoiceTwoTD = eecInfo.SumTDC;
 | 
	
		
			
				|  |  | -            mobileInfo.Currencys = CommonFun.GetCurrencyChinaToList(eecInfo.CurrencyRemark);
 | 
	
		
			
				|  |  | +            mobileInfo.Currencys = !string.IsNullOrEmpty(eecInfo.CurrencyRemark) ? CommonFun.GetCurrencyChinaToList(eecInfo.CurrencyRemark) : mobileInfo.Currencys;
 | 
	
		
			
				|  |  |              mobileInfo.ChoiceThreeTotalCost = dayAndCostData.Where(it => it.Type == 1).Sum(x => x.SubTotal); //住宿费 1
 | 
	
		
			
				|  |  |              mobileInfo.ChoiceFourTotalCost = dayAndCostData.Where(it => it.Type == 2).Sum(x => x.SubTotal);  //伙食费 2
 | 
	
		
			
				|  |  |              mobileInfo.ChoiceFiveTotalCost = dayAndCostData.Where(it => it.Type == 3).Sum(x => x.SubTotal);  //公杂费 3
 |