|
@@ -34,10 +34,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
/// </summary>
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<Result> DecreasePaymentsList(DecreasePaymentsListDto dto)
|
|
|
+ public async Task<JsonView> DecreasePaymentsList(DecreasePaymentsListDto dto)
|
|
|
{
|
|
|
- Result result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
-
|
|
|
string sqlWhere = "";
|
|
|
if (dto.IsPaySign != -1)
|
|
|
{
|
|
@@ -52,22 +50,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
Left Join Sys_Users as su On gdp.CreateUserId = su.Id
|
|
|
Where gdp.DiId = {0} And ccp.CTable = 98 {2} And ccp.IsDel = 0 And gdp.IsDel = 0 And gdp.CreateUserId in ({1}) ", dto.DiId, dto.UserId, sqlWhere);
|
|
|
List<DecreasePaymentsView> _DecreasePayments = await _sqlSugar.SqlQueryable<DecreasePaymentsView>(sql).ToListAsync();
|
|
|
- if (_DecreasePayments.Count > 0)
|
|
|
- {
|
|
|
- result = new Result() { Code = 0, Msg = "查询成功!", Data = _DecreasePayments };
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- result = new Result() { Code = 0, Msg = "暂无数据!", Data = _DecreasePayments };
|
|
|
- }
|
|
|
-
|
|
|
- return result;
|
|
|
+
|
|
|
+ return new JsonView() { Code = 200, Msg = MsgTips.Succeed, Data = _DecreasePayments };
|
|
|
}
|
|
|
|
|
|
- public async Task<Result> DecreasePaymentsSelect(DecreasePaymentsDto dto)
|
|
|
+ public async Task<JsonView> DecreasePaymentsSelect(DecreasePaymentsDto dto)
|
|
|
{
|
|
|
- Result result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
-
|
|
|
+
|
|
|
#region 团组下拉框
|
|
|
|
|
|
List<Grp_GroupsTaskAssignment> grp_GroupsTaskAssignment = Query<Grp_GroupsTaskAssignment>(a => a.IsDel == 0 && a.UId == dto.UserId && a.CTId == dto.CTId).ToList();
|
|
@@ -154,228 +143,213 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
supplier = _supplier,
|
|
|
supplierArea = _supplierArea
|
|
|
};
|
|
|
- return result = new Result() { Code = 0, Msg = "查询成功!", Data = data };
|
|
|
+ return new JsonView() { Code = 200, Msg = MsgTips.Status, Data = data };
|
|
|
|
|
|
}
|
|
|
|
|
|
- public async Task<Result> OpDecreasePayments(DecreasePaymentsOpDto dto)
|
|
|
+ public async Task<JsonView> OpDecreasePayments(DecreasePaymentsOpDto dto)
|
|
|
{
|
|
|
- Result result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
BeginTran();
|
|
|
- try
|
|
|
+ int id = 0;
|
|
|
+ Grp_DecreasePayments grp_Decrease = _mapper.Map<Grp_DecreasePayments>(dto);
|
|
|
+ //处理费用总计
|
|
|
+ if (grp_Decrease.FeeTotal == 0.00M)
|
|
|
+ {
|
|
|
+ grp_Decrease.FeeTotal = grp_Decrease.Price * grp_Decrease.Price;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<TeamRateDescAddCurrencyIdView> teamRates = await _teamRateRep.PostGroupTeamRateItemByDiIdAndCTableId(1, dto.DiId, 98);
|
|
|
+ if (dto.Status == 1)//添加
|
|
|
{
|
|
|
- int id = 0;
|
|
|
- Grp_DecreasePayments grp_Decrease = _mapper.Map<Grp_DecreasePayments>(dto);
|
|
|
- //处理费用总计
|
|
|
- if (grp_Decrease.FeeTotal == 0.00M)
|
|
|
+ string selectSql = string.Format(@"select * from Grp_DecreasePayments where PriceName='{0}' and IsDel={1} and DiId={2}"
|
|
|
+ , dto.PriceName, 0, dto.DiId);
|
|
|
+ var DecreasePayments = await _sqlSugar.SqlQueryable<Grp_DecreasePayments>(selectSql).FirstAsync();//查询是否存在
|
|
|
+ if (DecreasePayments != null)
|
|
|
{
|
|
|
- grp_Decrease.FeeTotal = grp_Decrease.Price * grp_Decrease.Price;
|
|
|
+ return new JsonView() { Code = 400, Msg = "该数据已存在,请勿重复添加!" };
|
|
|
}
|
|
|
-
|
|
|
- List<TeamRateDescAddCurrencyIdView> teamRates = await _teamRateRep.PostGroupTeamRateItemByDiIdAndCTableId(1, dto.DiId, 98);
|
|
|
- if (dto.Status == 1)//添加
|
|
|
+ else//不存在,可添加
|
|
|
{
|
|
|
- string selectSql = string.Format(@"select * from Grp_DecreasePayments where PriceName='{0}' and IsDel={1} and DiId={2}"
|
|
|
- , dto.PriceName, 0, dto.DiId);
|
|
|
- var DecreasePayments = await _sqlSugar.SqlQueryable<Grp_DecreasePayments>(selectSql).FirstAsync();//查询是否存在
|
|
|
- if (DecreasePayments != null)
|
|
|
+ id = await AddAsyncReturnId(grp_Decrease);
|
|
|
+ if (id < 1)
|
|
|
{
|
|
|
- return new Result() { Code = -1, Msg = "该数据已存在,请勿重复添加!" };
|
|
|
+ RollbackTran();
|
|
|
+ return new JsonView() { Code = 400, Msg = "添加失败!" };
|
|
|
}
|
|
|
- else//不存在,可添加
|
|
|
+
|
|
|
+ //进行C表添加
|
|
|
+ Grp_CreditCardPayment C = new Grp_CreditCardPayment();
|
|
|
+ C.PayDId = dto.PayDId;
|
|
|
+ C.ConsumptionPatterns = "";
|
|
|
+ C.ConsumptionDate = "";
|
|
|
+ C.CTDId = 0;
|
|
|
+ C.BankNo = "";
|
|
|
+ C.CardholderName = "";
|
|
|
+ C.PayMoney = grp_Decrease.FeeTotal;
|
|
|
+ C.PaymentCurrency = grp_Decrease.Currency;
|
|
|
+ //当天汇率
|
|
|
+ //if (!string.IsNullOrEmpty(hfRate.Value))
|
|
|
+ // C.DayRate = hfRate.Value;
|
|
|
+ //else
|
|
|
+ //C.DayRate = "";
|
|
|
+ C.CompanyBankNo = "";
|
|
|
+ C.OtherBankName = dto.OtherBankName;
|
|
|
+ C.OtherSideNo = dto.OtherSideNo;
|
|
|
+ C.OtherSideName = dto.OtherSideName;
|
|
|
+ C.Remark = "";
|
|
|
+ C.CreateUserId = grp_Decrease.CreateUserId;
|
|
|
+ C.MFOperator = 0;
|
|
|
+ C.MFOperatorDate = "";
|
|
|
+ C.IsAuditDM = 0;
|
|
|
+ C.AuditDMOperate = 0;
|
|
|
+ C.AuditDMDate = "";
|
|
|
+ C.IsAuditMF = 0;
|
|
|
+ C.AuditMFOperate = 0;
|
|
|
+ C.AuditMFDate = "";
|
|
|
+ C.IsAuditGM = 0;
|
|
|
+ C.AuditGMOperate = 21;
|
|
|
+ C.AuditGMDate = "";
|
|
|
+
|
|
|
+ if (C.PayDId == 72) C.IsPay = 1;
|
|
|
+ else C.IsPay = 0;
|
|
|
+
|
|
|
+ C.DIId = grp_Decrease.DiId;
|
|
|
+ C.CId = id;
|
|
|
+ C.CTable = 98;
|
|
|
+ C.PayPercentage = 100;
|
|
|
+ C.PayThenMoney = 0;
|
|
|
+ C.PayPercentageOld = 0;
|
|
|
+ C.PayThenMoneyOld = 0;
|
|
|
+ C.UpdateDate = "";
|
|
|
+ C.Payee = dto.SupplierName;
|
|
|
+ C.OrbitalPrivateTransfer = dto.OrbitalPrivateTransfer;
|
|
|
+ C.ExceedBudget = 0;
|
|
|
+ //C.RMBPrice = 0.00f;
|
|
|
+
|
|
|
+ //设置该团组的汇率
|
|
|
+ TeamRateDescAddCurrencyIdView teamRate = teamRates.Where(it => it.CurrencyId == grp_Decrease.Currency).FirstOrDefault();
|
|
|
+ //Grp_TeamRate _TeamRate = _sqlSugar.Queryable<Grp_TeamRate>().First(a => a.DiId == grp_Decrease.DiId && a.IsDel == 0 && a.CTable == 98);
|
|
|
+ if (teamRate != null)
|
|
|
{
|
|
|
- id = await AddAsyncReturnId(grp_Decrease);
|
|
|
- if (id < 1)
|
|
|
+ if (teamRate.CurrencyCode.Equals("CNY"))
|
|
|
{
|
|
|
- RollbackTran();
|
|
|
- return new Result() { Code = -1, Msg = "添加失败!" };
|
|
|
+ C.DayRate = 1.0000M;
|
|
|
+ C.RMBPrice = C.PayMoney;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ C.DayRate = teamRate.Rate;
|
|
|
+ C.RMBPrice = C.PayMoney * C.DayRate;
|
|
|
}
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ RollbackTran();
|
|
|
+ return new JsonView() { Code = 400, Msg = $"添加失败!团组汇率未设置{_sqlSugar.Queryable<Sys_SetData>().First(it => it.IsDel == 0 && it.Id == grp_Decrease.Currency)?.Name ?? ""}该币种汇率!" };
|
|
|
+ }
|
|
|
+ int cId = await _sqlSugar.Insertable(C).ExecuteReturnIdentityAsync();
|
|
|
+ if (cId != 0)
|
|
|
+ {
|
|
|
+ CommitTran();
|
|
|
+
|
|
|
+ var data = new { ccpId = cId, sign = 1 };
|
|
|
+ return new JsonView() { Code = 200, Msg = "添加成功!", Data = data };
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ RollbackTran();
|
|
|
+ return new JsonView() { Code = 400, Msg = "添加失败!" };
|
|
|
+ }
|
|
|
|
|
|
- //进行C表添加
|
|
|
- Grp_CreditCardPayment C = new Grp_CreditCardPayment();
|
|
|
- C.PayDId = dto.PayDId;
|
|
|
- C.ConsumptionPatterns = "";
|
|
|
- C.ConsumptionDate = "";
|
|
|
- C.CTDId = 0;
|
|
|
- C.BankNo = "";
|
|
|
- C.CardholderName = "";
|
|
|
- C.PayMoney = grp_Decrease.FeeTotal;
|
|
|
- C.PaymentCurrency = grp_Decrease.Currency;
|
|
|
- //当天汇率
|
|
|
- //if (!string.IsNullOrEmpty(hfRate.Value))
|
|
|
- // C.DayRate = hfRate.Value;
|
|
|
- //else
|
|
|
- //C.DayRate = "";
|
|
|
- C.CompanyBankNo = "";
|
|
|
- C.OtherBankName = "";
|
|
|
- C.OtherSideNo = "";
|
|
|
- C.OtherSideName = "";
|
|
|
- C.Remark = "";
|
|
|
- C.CreateUserId = grp_Decrease.CreateUserId;
|
|
|
- C.MFOperator = 0;
|
|
|
- C.MFOperatorDate = "";
|
|
|
- C.IsAuditDM = 0;
|
|
|
- C.AuditDMOperate = 0;
|
|
|
- C.AuditDMDate = "";
|
|
|
- C.IsAuditMF = 0;
|
|
|
- C.AuditMFOperate = 0;
|
|
|
- C.AuditMFDate = "";
|
|
|
- C.IsAuditGM = 0;
|
|
|
- C.AuditGMOperate = 21;
|
|
|
- C.AuditGMDate = "";
|
|
|
-
|
|
|
- if (C.PayDId == 72) C.IsPay = 1;
|
|
|
- else C.IsPay = 0;
|
|
|
-
|
|
|
- C.DIId = grp_Decrease.DiId;
|
|
|
- C.CId = id;
|
|
|
- C.CTable = 98;
|
|
|
- C.PayPercentage = 100;
|
|
|
- C.PayThenMoney = 0;
|
|
|
- C.PayPercentageOld = 0;
|
|
|
- C.PayThenMoneyOld = 0;
|
|
|
- C.UpdateDate = "";
|
|
|
- C.Payee = dto.SupplierName;
|
|
|
- C.OrbitalPrivateTransfer = dto.OrbitalPrivateTransfer;
|
|
|
- C.ExceedBudget = 0;
|
|
|
- //C.RMBPrice = 0.00f;
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
+ else if (dto.Status == 2)
|
|
|
+ {
|
|
|
+ bool res = await UpdateAsync(a => a.Id == grp_Decrease.Id, a => new Grp_DecreasePayments
|
|
|
+ {
|
|
|
+ DiId = grp_Decrease.DiId,
|
|
|
+ SupplierArea = grp_Decrease.SupplierArea,
|
|
|
+ SupplierTypeId = grp_Decrease.SupplierTypeId,
|
|
|
+ SupplierName = grp_Decrease.SupplierName,
|
|
|
+ SupplierContact = grp_Decrease.SupplierContact,
|
|
|
+ SupplierContactNumber = grp_Decrease.SupplierContactNumber,
|
|
|
+ SupplierSocialAccount = grp_Decrease.SupplierSocialAccount,
|
|
|
+ SupplierEmail = grp_Decrease.SupplierEmail,
|
|
|
+ SupplierAddress = grp_Decrease.SupplierAddress,
|
|
|
+ PriceName = grp_Decrease.PriceName,
|
|
|
+ Price = grp_Decrease.Price,
|
|
|
+ Quantity = grp_Decrease.Quantity,
|
|
|
+ FeeTotal = grp_Decrease.FeeTotal,
|
|
|
+ Currency = grp_Decrease.Currency,
|
|
|
+ FilePath = grp_Decrease.FilePath,
|
|
|
+ Remark = grp_Decrease.Remark,
|
|
|
+ });
|
|
|
+ if (res)
|
|
|
+ {
|
|
|
+ Grp_CreditCardPayment grp_CreditCardPayment = _sqlSugar.Queryable<Grp_CreditCardPayment>().First(a => a.CId == grp_Decrease.Id && a.CTable == 98 && a.CId == grp_Decrease.Id && a.IsDel == 0);
|
|
|
+ if (grp_CreditCardPayment != null)
|
|
|
+ {
|
|
|
//设置该团组的汇率
|
|
|
TeamRateDescAddCurrencyIdView teamRate = teamRates.Where(it => it.CurrencyId == grp_Decrease.Currency).FirstOrDefault();
|
|
|
- //Grp_TeamRate _TeamRate = _sqlSugar.Queryable<Grp_TeamRate>().First(a => a.DiId == grp_Decrease.DiId && a.IsDel == 0 && a.CTable == 98);
|
|
|
+
|
|
|
if (teamRate != null)
|
|
|
{
|
|
|
if (teamRate.CurrencyCode.Equals("CNY"))
|
|
|
{
|
|
|
- C.DayRate = 1.0000M;
|
|
|
- C.RMBPrice = C.PayMoney;
|
|
|
+ grp_CreditCardPayment.DayRate = 1.0000M;
|
|
|
+ grp_CreditCardPayment.RMBPrice = grp_CreditCardPayment.PayMoney;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- C.DayRate = teamRate.Rate;
|
|
|
- C.RMBPrice = C.PayMoney * C.DayRate;
|
|
|
+ grp_CreditCardPayment.DayRate = teamRate.Rate;
|
|
|
+ grp_CreditCardPayment.RMBPrice = grp_CreditCardPayment.PayMoney * grp_CreditCardPayment.DayRate;
|
|
|
}
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- RollbackTran();
|
|
|
- return new Result() { Code = -1, Msg = $"添加失败!团组汇率未设置{_sqlSugar.Queryable<Sys_SetData>().First(it => it.IsDel == 0 && it.Id == grp_Decrease.Currency)?.Name ?? ""}该币种汇率!" };
|
|
|
- }
|
|
|
- int cId = await _sqlSugar.Insertable(C).ExecuteReturnIdentityAsync();
|
|
|
- if (cId != 0)
|
|
|
- {
|
|
|
- CommitTran();
|
|
|
|
|
|
- var data = new { ccpId = cId, sign = 1 };
|
|
|
- return new Result() { Code = 0, Msg = "添加成功!", Data = data };
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
RollbackTran();
|
|
|
- return new Result() { Code = -1, Msg = "添加失败!" };
|
|
|
+ return new JsonView() { Code = 400, Msg = "修改失败!" };
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- else if (dto.Status == 2)
|
|
|
- {
|
|
|
- bool res = await UpdateAsync(a => a.Id == grp_Decrease.Id, a => new Grp_DecreasePayments
|
|
|
- {
|
|
|
- DiId = grp_Decrease.DiId,
|
|
|
- SupplierArea = grp_Decrease.SupplierArea,
|
|
|
- SupplierTypeId = grp_Decrease.SupplierTypeId,
|
|
|
- SupplierName = grp_Decrease.SupplierName,
|
|
|
- SupplierContact = grp_Decrease.SupplierContact,
|
|
|
- SupplierContactNumber = grp_Decrease.SupplierContactNumber,
|
|
|
- PriceName = grp_Decrease.PriceName,
|
|
|
- Price = grp_Decrease.Price,
|
|
|
- Quantity = grp_Decrease.Quantity,
|
|
|
- FeeTotal = grp_Decrease.FeeTotal,
|
|
|
- Currency = grp_Decrease.Currency,
|
|
|
- FilePath = grp_Decrease.FilePath,
|
|
|
- Remark = grp_Decrease.Remark,
|
|
|
- });
|
|
|
- if (res)
|
|
|
- {
|
|
|
- Grp_CreditCardPayment grp_CreditCardPayment = _sqlSugar.Queryable<Grp_CreditCardPayment>().First(a => a.CId == grp_Decrease.Id && a.CTable == 98 && a.CId == grp_Decrease.Id && a.IsDel == 0);
|
|
|
- if (grp_CreditCardPayment != null)
|
|
|
+ int ispay = 0;
|
|
|
+ if (dto.PayDId == 72) ispay = 1;
|
|
|
+
|
|
|
+
|
|
|
+ int CTable = await _sqlSugar.Updateable<Grp_CreditCardPayment>()
|
|
|
+ .Where(a => a.Id == grp_CreditCardPayment.Id)
|
|
|
+ .SetColumns(a => new Grp_CreditCardPayment
|
|
|
+ {
|
|
|
+ OtherSideName = dto.OtherSideName,
|
|
|
+ OtherSideNo = dto.OtherSideNo,
|
|
|
+ OtherBankName = dto.OtherBankName,
|
|
|
+ PayDId = dto.PayDId,
|
|
|
+ IsPay = ispay,
|
|
|
+ PayMoney = grp_Decrease.FeeTotal,
|
|
|
+ PaymentCurrency = grp_Decrease.Currency,
|
|
|
+ Payee = dto.SupplierName,
|
|
|
+ OrbitalPrivateTransfer = dto.OrbitalPrivateTransfer,
|
|
|
+ DayRate = grp_CreditCardPayment.DayRate,
|
|
|
+ RMBPrice = grp_CreditCardPayment.RMBPrice,
|
|
|
+
|
|
|
+ }).ExecuteCommandAsync();
|
|
|
+ if (CTable > 0)
|
|
|
{
|
|
|
- //设置该团组的汇率
|
|
|
- TeamRateDescAddCurrencyIdView teamRate = teamRates.Where(it => it.CurrencyId == grp_Decrease.Currency).FirstOrDefault();
|
|
|
-
|
|
|
- if (teamRate != null)
|
|
|
- {
|
|
|
- if (teamRate.CurrencyCode.Equals("CNY"))
|
|
|
- {
|
|
|
- grp_CreditCardPayment.DayRate = 1.0000M;
|
|
|
- grp_CreditCardPayment.RMBPrice = grp_CreditCardPayment.PayMoney;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- grp_CreditCardPayment.DayRate = teamRate.Rate;
|
|
|
- grp_CreditCardPayment.RMBPrice = grp_CreditCardPayment.PayMoney * grp_CreditCardPayment.DayRate;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- RollbackTran();
|
|
|
- return new Result() { Code = -1, Msg = "修改失败!" };
|
|
|
- }
|
|
|
-
|
|
|
- int ispay = 0;
|
|
|
- if (dto.PayDId == 72) ispay = 1;
|
|
|
-
|
|
|
-
|
|
|
- int CTable = await _sqlSugar.Updateable<Grp_CreditCardPayment>()
|
|
|
- .Where(a => a.Id == grp_CreditCardPayment.Id)
|
|
|
- .SetColumns(a => new Grp_CreditCardPayment
|
|
|
- {
|
|
|
- PayDId = dto.PayDId,
|
|
|
- IsPay = ispay,
|
|
|
- PayMoney = grp_Decrease.FeeTotal,
|
|
|
- PaymentCurrency = grp_Decrease.Currency,
|
|
|
- Payee = dto.SupplierName,
|
|
|
- OrbitalPrivateTransfer = dto.OrbitalPrivateTransfer,
|
|
|
- DayRate = grp_CreditCardPayment.DayRate,
|
|
|
- RMBPrice = grp_CreditCardPayment.RMBPrice,
|
|
|
-
|
|
|
- }).ExecuteCommandAsync();
|
|
|
- if (CTable > 0)
|
|
|
- {
|
|
|
- CommitTran();
|
|
|
+ CommitTran();
|
|
|
|
|
|
- var data = new { ccpId = grp_CreditCardPayment.Id, sign = 2 };
|
|
|
+ var data = new { ccpId = grp_CreditCardPayment.Id, sign = 2 };
|
|
|
|
|
|
- return new Result() { Code = 0, Msg = "修改成功!", Data = data };
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- RollbackTran();
|
|
|
- return new Result() { Code = -1, Msg = "修改失败!" };
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- RollbackTran();
|
|
|
- return new Result() { Code = -1, Msg = "修改失败!" };
|
|
|
+ return new JsonView() { Code = 200, Msg = "修改成功!", Data = data };
|
|
|
}
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- RollbackTran();
|
|
|
- return new Result() { Code = -1, Msg = "修改失败!" };
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
RollbackTran();
|
|
|
- return new Result() { Code = -2, Msg = ex.Message };
|
|
|
+ return new JsonView() { Code = 400, Msg = "修改失败!" };
|
|
|
}
|
|
|
- return result;
|
|
|
+ RollbackTran();
|
|
|
+ return new JsonView() { Code = 400, Msg = MsgTips.Fail }; ;
|
|
|
}
|
|
|
|
|
|
public async Task<Result> PostGroupNameAndEasy(DecreasePaymentsDto dto)
|
|
@@ -454,7 +428,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
|
- public async Task<Result> QueryDecreasePaymentsById(DecreasePaymentsByIdDto dto)
|
|
|
+ public async Task<JsonView> QueryDecreasePaymentsById(DecreasePaymentsByIdDto dto)
|
|
|
{
|
|
|
string sql = string.Format($@"Select
|
|
|
dp.Id,
|
|
@@ -464,6 +438,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
dp.SupplierName,
|
|
|
dp.SupplierContact,
|
|
|
dp.SupplierContactNumber,
|
|
|
+ dp.SupplierSocialAccount,
|
|
|
+ dp.SupplierEmail,
|
|
|
+ dp.SupplierAddress,
|
|
|
dp.PriceName,
|
|
|
dp.Price,
|
|
|
dp.Quantity,
|
|
@@ -472,14 +449,17 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
dp.FilePath,
|
|
|
dp.Remark,
|
|
|
ccp.PayDId,
|
|
|
- ccp.OrbitalPrivateTransfer
|
|
|
+ ccp.OrbitalPrivateTransfer,
|
|
|
+ ccp.OtherBankName,
|
|
|
+ ccp.OtherSideName,
|
|
|
+ ccp.OtherSideNo
|
|
|
From Grp_DecreasePayments dp With(NoLock)
|
|
|
Left Join Grp_CreditCardPayment ccp With(NoLock) On dp.Id = ccp.CId And dp.DiId = ccp.DIId And ccp.CTable = 98
|
|
|
- Where dp.IsDel = 0 And dp.Id = {dto.Id}");
|
|
|
+ Where dp.IsDel = 0 And dp.Id = {dto.Id}");
|
|
|
|
|
|
var info = await _sqlSugar.SqlQueryable<DecreasePaymentsInfoView>(sql).FirstAsync();
|
|
|
|
|
|
- return new Result() { Code = 0, Msg = "查询成功!", Data = info };
|
|
|
+ return new JsonView() { Code = 200, Msg = MsgTips.Fail, Data = info };
|
|
|
}
|
|
|
|
|
|
/// <summary>
|