|
@@ -75,7 +75,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
|
|
|
public async Task<Result> AirTicketResList(AirTicketResDto dto)
|
|
public async Task<Result> AirTicketResList(AirTicketResDto dto)
|
|
{
|
|
{
|
|
- Result result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
|
|
|
+ Result result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
|
|
|
Grp_DelegationInfo _DelegationInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().First(it => it.Id == dto.DiId);
|
|
Grp_DelegationInfo _DelegationInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().First(it => it.Id == dto.DiId);
|
|
if (_DelegationInfo != null)
|
|
if (_DelegationInfo != null)
|
|
@@ -103,7 +103,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
Res_ThreeCode arrData = _sqlSugar.Queryable<Res_ThreeCode>().First(it => it.IsDel == 0 && it.Three == arrCode);
|
|
Res_ThreeCode arrData = _sqlSugar.Queryable<Res_ThreeCode>().First(it => it.IsDel == 0 && it.Three == arrCode);
|
|
|
|
|
|
string day = spDotandEmpty[2].Substring(2, 2);//日
|
|
string day = spDotandEmpty[2].Substring(2, 2);//日
|
|
- string monthAbbreviations = spDotandEmpty[1].Substring(4, 3).ToUpper();//月份
|
|
|
|
|
|
+ string monthAbbreviations = spDotandEmpty[2].Substring(4, 3).ToUpper();//月份
|
|
switch (monthAbbreviations)
|
|
switch (monthAbbreviations)
|
|
{
|
|
{
|
|
case "JAN":
|
|
case "JAN":
|
|
@@ -146,7 +146,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
string tate = $"{monthAbbreviations}月{day}日";
|
|
string tate = $"{monthAbbreviations}月{day}日";
|
|
item.FlightDescription += rowindex + ". " + depData.AirPort + " " + arrData.AirPort + " (" + tate + ")\r\n";
|
|
item.FlightDescription += rowindex + ". " + depData.AirPort + " " + arrData.AirPort + " (" + tate + ")\r\n";
|
|
}
|
|
}
|
|
- catch (Exception)
|
|
|
|
|
|
+ catch (Exception ex)
|
|
{
|
|
{
|
|
item.FlightDescription = "录入数据不规范!请检查";
|
|
item.FlightDescription = "录入数据不规范!请检查";
|
|
break;
|
|
break;
|
|
@@ -217,7 +217,17 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
Grp_GroupCostParameter _GroupCostParameter = _sqlSugar.Queryable<Grp_GroupCostParameter>().First(a => a.DiId == dto.DiId);
|
|
Grp_GroupCostParameter _GroupCostParameter = _sqlSugar.Queryable<Grp_GroupCostParameter>().First(a => a.DiId == dto.DiId);
|
|
|
|
|
|
AirGroupCostParameterView _AirgroupCostParameter = _mapper.Map<AirGroupCostParameterView>(_GroupCostParameter);
|
|
AirGroupCostParameterView _AirgroupCostParameter = _mapper.Map<AirGroupCostParameterView>(_GroupCostParameter);
|
|
-
|
|
|
|
|
|
+ for (int i = 0; i <_AirTicketReservations.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ string [] ClientArr= _AirTicketReservations[i].ClientName.Split(',');
|
|
|
|
+
|
|
|
|
+ foreach (var item in ClientArr)
|
|
|
|
+ {
|
|
|
|
+ Crm_GroupCustomer crm_GroupCustomer = _sqlSugar.Queryable<Crm_GroupCustomer>().Where(a => a.IsDel==0 && a.Id==int.Parse(item)).First();
|
|
|
|
+ _AirTicketReservations[i].ClientNameStr+=crm_GroupCustomer.Pinyin+',';
|
|
|
|
+ }
|
|
|
|
+ _AirTicketReservations[i].ClientNameStr=_AirTicketReservations[i].ClientNameStr.Substring(0, _AirTicketReservations[i].ClientNameStr.Length-1);
|
|
|
|
+ }
|
|
var data = new
|
|
var data = new
|
|
{
|
|
{
|
|
DelegationInfo = _DelegationInfo,
|
|
DelegationInfo = _DelegationInfo,
|
|
@@ -242,20 +252,24 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
|
|
|
|
|
|
|
List<Grp_GroupsTaskAssignment> grp_GroupsTaskAssignment = Query<Grp_GroupsTaskAssignment>(a => a.IsDel == 0 && a.UId == dto.UserId && a.CTId == 85).ToList();
|
|
List<Grp_GroupsTaskAssignment> grp_GroupsTaskAssignment = Query<Grp_GroupsTaskAssignment>(a => a.IsDel == 0 && a.UId == dto.UserId && a.CTId == 85).ToList();
|
|
-
|
|
|
|
|
|
+ List<GroupNameView> grp_NameView = new List<GroupNameView>();
|
|
string DiId = "";
|
|
string DiId = "";
|
|
foreach (var item in grp_GroupsTaskAssignment)
|
|
foreach (var item in grp_GroupsTaskAssignment)
|
|
{
|
|
{
|
|
DiId += item.DIId + ",";
|
|
DiId += item.DIId + ",";
|
|
}
|
|
}
|
|
- DiId = DiId.Substring(0, DiId.Length - 1);
|
|
|
|
|
|
+ if (DiId.Length>1)
|
|
|
|
+ {
|
|
|
|
+ DiId = DiId.Substring(0, DiId.Length - 1);
|
|
|
|
+
|
|
string sql = string.Format(@"select * from Grp_DelegationInfo where Id in({0}) and IsDel={1}", DiId, 0);
|
|
string sql = string.Format(@"select * from Grp_DelegationInfo where Id in({0}) and IsDel={1}", DiId, 0);
|
|
List<Grp_DelegationInfo> grp_Delegations = _sqlSugar.SqlQueryable<Grp_DelegationInfo>(sql).ToList();
|
|
List<Grp_DelegationInfo> grp_Delegations = _sqlSugar.SqlQueryable<Grp_DelegationInfo>(sql).ToList();
|
|
- if (grp_Delegations.Count == 0)
|
|
|
|
|
|
+
|
|
|
|
+ if (grp_Delegations.Count == 0)
|
|
{
|
|
{
|
|
return result = new Result() { Code = -1, Msg = "查询失败!" };
|
|
return result = new Result() { Code = -1, Msg = "查询失败!" };
|
|
}
|
|
}
|
|
- List<GroupNameView> grp_NameView = new List<GroupNameView>();
|
|
|
|
|
|
+
|
|
foreach (var item in grp_Delegations)
|
|
foreach (var item in grp_Delegations)
|
|
{
|
|
{
|
|
GroupNameView groupNameView = new GroupNameView();
|
|
GroupNameView groupNameView = new GroupNameView();
|
|
@@ -263,6 +277,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
groupNameView.GroupName = item.TeamName;
|
|
groupNameView.GroupName = item.TeamName;
|
|
grp_NameView.Add(groupNameView);
|
|
grp_NameView.Add(groupNameView);
|
|
}
|
|
}
|
|
|
|
+ }
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
#region 其他下拉框查询
|
|
#region 其他下拉框查询
|