Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
a3b99f3029
  1. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs

18
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs

@ -70,18 +70,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var settle = await _hbpoMng.GetMainAsync(inv.InvGroupNum); var settle = await _hbpoMng.GetMainAsync(inv.InvGroupNum);
if (settle == null) if (settle == null)
{ {
throw new UserFriendlyException( $"选择发票:{p_invbillnum}对应的可结算单不存在请检查!"); throw new UserFriendlyException( $"选择发票:{p_invbillnum}对应的可结算单不存在请检查!","400");
} }
version = settle.Version; version = settle.Version;
if (inv != null) if (inv != null)
{ {
if (inv.InvoiceState == InvoiceBillState.) if (inv.InvoiceState == InvoiceBillState.)
{ {
throw new UserFriendlyException( $"选择发票:{p_invbillnum}状态为报废状态不能重开!"); throw new UserFriendlyException( $"选择发票:{p_invbillnum}状态为报废状态不能重开!", "400");
} }
if (inv.State == SettleBillState. || inv.State == SettleBillState.) if (inv.State == SettleBillState. || inv.State == SettleBillState.)
{ {
throw new UserFriendlyException( $"选择发票:{p_invbillnum}状态在财务审核后可以报废重开,之前请退回重开!"); throw new UserFriendlyException( $"选择发票:{p_invbillnum}状态在财务审核后可以报废重开,之前请退回重开!", "400");
} }
var hbpolist = await _hbpoMng.GetContainsAsync(inv.InvbillNum);//结算分组对应结算零件 var hbpolist = await _hbpoMng.GetContainsAsync(inv.InvbillNum);//结算分组对应结算零件
var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细 var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
@ -162,7 +162,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
else else
{ {
throw new UserFriendlyException( $"不存发票号为:{p_invbillnum}发票"); throw new UserFriendlyException( $"不存发票号为:{p_invbillnum}发票", "400");
} }
//} //}
//else //else
@ -186,7 +186,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var adjlist = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list); var adjlist = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list);
if (adjlist == null && adjlist.Count == 0) if (adjlist == null && adjlist.Count == 0)
{ {
throw new UserFriendlyException($"调整表无数据!"); throw new UserFriendlyException($"调整表无数据!", "400");
} }
var first = p_list.FirstOrDefault(); var first = p_list.FirstOrDefault();
var invbillnum = first.InvBillNum; var invbillnum = first.InvBillNum;
@ -201,18 +201,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var settle = await _hbpoMng.GetMainAsync(inv.InvGroupNum); var settle = await _hbpoMng.GetMainAsync(inv.InvGroupNum);
if (settle == null) if (settle == null)
{ {
throw new UserFriendlyException($"选择发票:{invbillnum}对应的可结算单不存在请检查!"); throw new UserFriendlyException($"选择发票:{invbillnum}对应的可结算单不存在请检查!", "400");
} }
version = settle.Version; version = settle.Version;
if (inv != null) if (inv != null)
{ {
if (inv.InvoiceState == InvoiceBillState.) if (inv.InvoiceState == InvoiceBillState.)
{ {
throw new UserFriendlyException($"选择发票:{invbillnum}状态为报废状态不能重开!"); throw new UserFriendlyException($"选择发票:{invbillnum}状态为报废状态不能重开!", "400");
} }
if (inv.State == SettleBillState. || inv.State == SettleBillState.) if (inv.State == SettleBillState. || inv.State == SettleBillState.)
{ {
throw new UserFriendlyException($"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前请退回重开!"); throw new UserFriendlyException($"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前请退回重开!", "400");
} }
var hbpolist = await _hbpoMng.GetContainsAsync(inv.InvbillNum);//结算分组对应结算零件 var hbpolist = await _hbpoMng.GetContainsAsync(inv.InvbillNum);//结算分组对应结算零件
// var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细 // var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
@ -290,7 +290,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
else else
{ {
throw new UserFriendlyException($"不存发票号为:{invbillnum}发票"); throw new UserFriendlyException($"不存发票号为:{invbillnum}发票", "400");
} }
//} //}
//else //else

Loading…
Cancel
Save