|
@@ -52,7 +52,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Grp_CreditCardPayment grp_CreditCard = _sqlSugar.Queryable<Grp_CreditCardPayment>().First(a => a.CId == grp_AirTicket.Id && a.IsDel == 0);
|
|
|
+ Grp_CreditCardPayment grp_CreditCard = _sqlSugar.Queryable<Grp_CreditCardPayment>().First(a => a.CId == grp_AirTicket.Id && a.IsDel == 0 && a.CTable==85);
|
|
|
if (grp_CreditCard == null) { return result = new Result() { Code = -1, Msg = "暂无数据" }; }
|
|
|
return result = new Result()
|
|
|
{
|
|
@@ -80,17 +80,26 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
Grp_DelegationInfo _DelegationInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().First(it => it.Id == dto.DiId);
|
|
|
if (_DelegationInfo != null)
|
|
|
{
|
|
|
+ string UserId = "";
|
|
|
+ List<Grp_GroupsTaskAssignment> gtaUIdList = _sqlSugar.Queryable<Grp_GroupsTaskAssignment>().Where(a=>a.DIId==dto.DiId && a.IsDel==0 && a.CTId==85).ToList();
|
|
|
+ foreach (Grp_GroupsTaskAssignment gta in gtaUIdList)
|
|
|
+ UserId += gta.UId + ",";
|
|
|
+
|
|
|
+ if (!string.IsNullOrWhiteSpace(UserId))
|
|
|
+ {
|
|
|
+ UserId = UserId.Substring(0, UserId.Length - 1);
|
|
|
+ }
|
|
|
string sql = string.Format(@"select a.*,c.IsAuditGM,(select Name from Sys_SetData where Id=a.cType) as 'CTypeName',(select Name from
|
|
|
Sys_SetData where Id=a.PreCurrency) as 'PreCurrencyStr',(select Name from Sys_SetData where Id=a.Currency)
|
|
|
as 'CurrencyStr' from Grp_AirTicketReservations a,Grp_CreditCardPayment c where a.id=c.CId and a.isdel={1} and c.IsDel={1}
|
|
|
- and a.DIId={0} and a.CreateUserId={2} Order By a.CreateTime desc", dto.DiId, 0,dto.UserId);
|
|
|
+ and a.DIId={0} and c.DIId={0} and c.CTable=85 and a.CreateUserId in({2}) Order By a.CreateTime desc", dto.DiId, 0,UserId);
|
|
|
List<AirTicketReservationsView> _AirTicketReservations = _sqlSugar.SqlQueryable<AirTicketReservationsView>(sql).ToList();
|
|
|
|
|
|
foreach (var item in _AirTicketReservations)
|
|
|
{
|
|
|
- if (item.FlightsDescription.Contains("\r\n"))
|
|
|
+ if (item.FlightsDescription.Contains("\n"))
|
|
|
{
|
|
|
- var spilitArr = Regex.Split(item.FlightsDescription, "\r\n");
|
|
|
+ var spilitArr = Regex.Split(item.FlightsDescription, "\n");
|
|
|
int rowindex = 1;
|
|
|
foreach (var spilitItem in spilitArr)
|
|
|
{
|
|
@@ -366,11 +375,17 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
var DeleClient = await _sqlSugar.SqlQueryable<Grp_AirTicketReservations>(selectSql).FirstAsync();//查询是否存在
|
|
|
if (DeleClient != null)
|
|
|
{
|
|
|
- return result = new Result() { Code = -1, Msg = "该客户已存在,请勿重复添加!" };
|
|
|
+ return result = new Result() { Code = -1, Msg = "该机票信息已存在,请勿重复添加!" };
|
|
|
}
|
|
|
else//不存在,可添加
|
|
|
{
|
|
|
-
|
|
|
+ //grp_AirTicket.ArrivedTime = "";
|
|
|
+ //grp_AirTicket.LeaveDescription = "";
|
|
|
+ //grp_AirTicket.FlightsDescription = "";
|
|
|
+ //grp_AirTicket.DeleteUserId = 0;
|
|
|
+ //grp_AirTicket.DeleteTime = "";
|
|
|
+ //grp_AirTicket.ReturnDescription = "";
|
|
|
+ grp_AirTicket.FlightsDate= DateTime.Parse(grp_AirTicket.FlightsDate).ToString("yyyy-MM-dd");
|
|
|
id = await AddAsyncReturnId(grp_AirTicket);
|
|
|
if (id == 0)
|
|
|
{
|
|
@@ -518,7 +533,12 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
return result = new Result() { Code = -1, Msg = "添加失败!" };
|
|
|
|
|
|
}
|
|
|
+ await UpdateAsync(a => a.Id == id, a => new Grp_AirTicketReservations
|
|
|
+ {
|
|
|
+ FlightsDescription = dto.AirTicketResOpData.FlightsDescription,
|
|
|
+ });
|
|
|
CommitTran();
|
|
|
+
|
|
|
return result = new Result() { Code = 0, Msg = "添加成功!" };
|
|
|
//C表操作
|
|
|
}
|