|
@@ -1,8 +1,10 @@
|
|
|
using AutoMapper;
|
|
|
using OASystem.Domain;
|
|
|
using OASystem.Domain.Dtos.Groups;
|
|
|
+using OASystem.Domain.Entities.Financial;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
|
+using OASystem.Infrastructure.Tools;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
@@ -21,9 +23,99 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
_mapper = mapper;
|
|
|
}
|
|
|
|
|
|
- public Task<Result> OpCarTouristGuideGround(OpCarTouristGuideGroundDto dto)
|
|
|
+ public async Task<Result> OpCarTouristGuideGround(OpCarTouristGuideGroundDto dto)
|
|
|
{
|
|
|
- throw new NotImplementedException();
|
|
|
+ Result result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
+ BeginTran();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ //int id = 0;
|
|
|
+ //Grp_CarTouristGuideGroundReservations grp_CarTouristGuide = _mapper.Map<Grp_CarTouristGuideGroundReservations>(dto);
|
|
|
+ //if (dto.Status == 1)//添加
|
|
|
+ //{
|
|
|
+ // Grp_CarTouristGuideGroundReservations grp_CarTouristGuideGround = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservations>().First(a => a.IsDel == 0 && a.Area == dto.Area && a.BusName == dto.BusName && a.ServiceGuide == dto.ServiceGuide);
|
|
|
+ // if (grp_CarTouristGuideGround != null)
|
|
|
+ // {
|
|
|
+ // return result = new Result() { Code = -1, Msg = "该笔费用已存在,请勿重复添加!" };
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // id = await AddAsyncReturnId(grp_CarTouristGuide);
|
|
|
+ // if (id != 0)
|
|
|
+ // {
|
|
|
+ // //int cId = await _sqlSugar.Insertable(c).ExecuteReturnIdentityAsync();
|
|
|
+ // if (true)
|
|
|
+ // {
|
|
|
+ // result = new Result() { Code = 0, Msg = "添加成功!" };
|
|
|
+
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // RollbackTran();
|
|
|
+ // result = new Result() { Code = -1, Msg = "添加失败!" };
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // RollbackTran();
|
|
|
+ // result = new Result() { Code = -1, Msg = "添加失败,请稍后重试!" };
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ //}
|
|
|
+ //else if (dto.Status == 2)//修改
|
|
|
+ //{
|
|
|
+
|
|
|
+ // bool res = await UpdateAsync(a => a.Id == dto.Id, a => new Grp_VisaInfo
|
|
|
+ // {
|
|
|
+ // VisaClient = grp_Visa1.VisaClient,
|
|
|
+ // VisaPrice = grp_Visa1.VisaPrice,
|
|
|
+ // VisaCurrency = grp_Visa1.VisaCurrency,
|
|
|
+ // IsThird = grp_Visa1.IsThird,
|
|
|
+ // PassengerType = grp_Visa1.PassengerType,
|
|
|
+ // VisaNumber = grp_Visa1.VisaNumber,
|
|
|
+ // VisaFreeNumber = grp_Visa1.VisaFreeNumber,
|
|
|
+ // Remark = dto.Remark,
|
|
|
+ // });
|
|
|
+ // if (res)
|
|
|
+ // {
|
|
|
+ // int CTable = await _sqlSugar.Updateable<Grp_CreditCardPayment>().Where(a => a.CId == grp_Visa1.Id && a.CTable == 80).SetColumns(a => new Grp_CreditCardPayment
|
|
|
+ // {
|
|
|
+ // PayDId = dto.PayDId,
|
|
|
+ // PayMoney = c.PayMoney,
|
|
|
+ // PaymentCurrency = c.PaymentCurrency,
|
|
|
+ // Payee = c.Payee,
|
|
|
+ // OrbitalPrivateTransfer = c.OrbitalPrivateTransfer,
|
|
|
+ // DayRate = c.DayRate,
|
|
|
+ // RMBPrice = c.RMBPrice,
|
|
|
+ // ConsumptionPatterns = c.ConsumptionPatterns,
|
|
|
+ // ConsumptionDate = c.ConsumptionDate,
|
|
|
+ // CTDId = c.CTDId,
|
|
|
+ // CompanyBankNo = c.CompanyBankNo,
|
|
|
+ // OtherBankName = c.OtherBankName,
|
|
|
+ // OtherSideNo = c.OtherSideNo,
|
|
|
+ // OtherSideName = c.OtherSideName,
|
|
|
+ // BankNo = c.BankNo,
|
|
|
+ // CardholderName = c.CardholderName,
|
|
|
+ // Remark = c.Remark,
|
|
|
+
|
|
|
+ // }).ExecuteCommandAsync();
|
|
|
+
|
|
|
+ // result = new Result() { Code = 0, Msg = "修改成功!" };
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // RollbackTran();
|
|
|
+ // result = new Result() { Code = -1, Msg = "修改失败,请稍后重试!" };
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ //CommitTran();
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
+ }
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
public async Task<Result> QueryCarTouristGuideGroundByDiId(CarTouristGuideGroundDto dto)
|