Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
3487385995
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
  2. 40
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
  3. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  4. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs
  5. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs

@ -182,7 +182,7 @@ public class ADJ_SERVICE : BASE_SERVICE
{
if (p_list.Count == 0)
{
throw new UserFriendlyException($"导入数据为空");
throw new UserFriendlyException($"导入数据为空","400");
}
foreach (var itm in p_list)

40
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs

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

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs

@ -58,7 +58,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var lst = ls.Where(p => (p.State == SettleBillState. || p.State == SettleBillState.));
if (lst.Count() > 0)
{
throw new UserFriendlyException("当前状态是已提交状态,不能重复已提交");
throw new UserFriendlyException("当前状态是已提交状态,不能重复已提交", "400");
}
foreach (var item in ls)
{

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

@ -367,7 +367,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
qty: itm.Qty,
price: itm.Price,
businessType: itm.BusinessType,
settleDate: itm.SettleDate,
groupNum: itm.GroupNum,
invGroupNum: itm.InvGroupNum,
@ -618,11 +617,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
throw new UserFriendlyException($"不存发票号为:{invbillnum}发票", "400");
}
//}
//else
//{
// throw new UserFriendlyException($"不存发票号:{invbillnum}对应的结算分组号");
//}
return new JsonResult(new { Code = 200, Message = "生成成功", Data = invBilllist });

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs

@ -49,7 +49,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_priceRepository = priceRepository;
_pricebjRepository = pricebjRepository;
_adjservice= adjservice;
}
/// <summary>
@ -217,7 +216,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[UnitOfWork(false)]
public override async Task<IActionResult> ReissueInvoice([FromBody] string p_invbillnum)
{
//var mappingList = await GetMapGroupAsync(p_invbillnum);//发票对应结算分组
@ -331,6 +331,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
return new JsonResult(new { Code = 200, Message = "发票重开成功" }); ;
}
[HttpPost]
[UnitOfWork(false)]
/// 发票重开列表
/// </summary>
/// <param name="input"></param>
@ -512,6 +513,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
[UnitOfWork(false)]
public virtual async Task<IActionResult> ReissueInvoiceList(List<PUB_ADJ_DETAIL_DTO> p_list)
{

Loading…
Cancel
Save