Browse Source

填加[UnitOfWork(false)]

master
学 赵 1 year ago
parent
commit
4ab2def3da
  1. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  2. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs
  3. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
  4. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
  5. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  6. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs
  7. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  8. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  9. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs
  10. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  11. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  12. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs
  13. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
  14. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs

@ -524,7 +524,7 @@ namespace Win.Sfs.SettleAccount.Bases
throw new BusinessException("8989", "生成失败,请检查调发票整表和旧发票内容");
}
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// 第一次开票
/// </summary>
@ -544,7 +544,7 @@ namespace Win.Sfs.SettleAccount.Bases
}
throw new BusinessException("8989", "生成失败,请检查调整表和旧发票内容");
}
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// hbpo、jit、备件等
/// </summary>
@ -563,7 +563,7 @@ namespace Win.Sfs.SettleAccount.Bases
throw new BusinessException("8989", "生成失败,请检查调发票整表和旧发票内容");
}
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// 第一次开票
/// </summary>

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs

@ -142,7 +142,7 @@ namespace Win.Sfs.SettleAccount.Bases
var dtos = ObjectMapper.Map<List<TEntity>, List<TEntityDto>>(entitys);
return new PagedResultDto<TEntityDto>(totalCount, dtos);
}
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// hbpo、jit、备件等
/// </summary>
@ -190,7 +190,7 @@ namespace Win.Sfs.SettleAccount.Bases
throw new BusinessException("8989", "生成失败,请检可结算单明细数据是否结算分组存在");
}
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// 第一次开票
/// </summary>

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
using DocumentFormat.OpenXml.Bibliography;
using DocumentFormat.OpenXml.Drawing.Charts;
using DocumentFormat.OpenXml.Office2010.Excel;
@ -133,13 +133,13 @@ namespace Win.Sfs.SettleAccount.Bases
return _fileName;
}
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
public virtual async Task<string> ApprovalPassed(List<string> p_list)
{
return await InvokePD(p_list, _service, false);
}
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
public virtual async Task<string> RejectAsync(List<string> p_list)
{
return await InvokePD(p_list, _service, true);

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

@ -203,7 +203,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// 发票重开
/// </summary>
@ -338,7 +338,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// 发票重开列表
/// </summary>
@ -482,7 +482,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// 发票重开列表
/// </summary>

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs

@ -68,7 +68,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
[HttpPost]
public async Task<IActionResult> GenerateInvoice([FromBody] string invbillNum)

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

@ -164,7 +164,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// 发票重开
@ -303,7 +303,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// 发票重开列表
/// </summary>
/// <param name="input"></param>
@ -442,7 +442,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// 发票重开列表
/// </summary>
/// <param name="input"></param>

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

@ -65,7 +65,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <returns></returns>
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
//[Route("generateinvoice")]
public async Task<IActionResult> GenerateInvoice([FromBody] string invbillnum)
{

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

@ -83,7 +83,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
public virtual async Task<IActionResult> ApprovalPassed(List<string> p_invs)
{
List<ERR_EXP_DTO> errors = new List<ERR_EXP_DTO>();

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

@ -57,7 +57,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <exception cref="UserFriendlyException"></exception>
/// <exception cref="BusinessException"></exception>
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
public virtual async Task<IActionResult> ReissueInvoiceExtend(List<PUB_ADJ_DETAIL_DTO> p_list)
{
var errorlist = await CheckRepeat(p_list).ConfigureAwait(false);
@ -209,7 +209,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
public override async Task<IActionResult> ReissueInvoice([FromBody] string p_invbillnum)
{
//var mappingList = await GetMapGroupAsync(p_invbillnum);//发票对应结算分组
@ -324,7 +324,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
return new JsonResult(new { Code = 200, Message = "发票重开成功" }); ;
}
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// 发票重开列表
/// </summary>
/// <param name="input"></param>
@ -509,7 +509,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
public virtual async Task<IActionResult> ReissueInvoiceList(List<PUB_ADJ_DETAIL_DTO> p_list)
{
var result = await _adjservice.CheckImport(p_list).ConfigureAwait(false);

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

@ -63,7 +63,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_notRepository = notRepository;
}
[HttpPost]
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
public async Task<IActionResult> GenerateInvoice([FromBody] string billnum)
{
var main = await _pubMng.GetMainAsync(billnum).ConfigureAwait(false);

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -31,7 +31,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
_dbcontext = dbcontext;
}
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs

@ -109,9 +109,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
break;
}
await _repository.DbContext.BulkUpdateAsync(new List<BBAC_CAN_SA> { first }).ConfigureAwait(false);
return true;
}
/// <summary>
/// 向后流程

9
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs

@ -7,6 +7,7 @@ using SettleAccount.Domain.BQ;
using Volo.Abp.Domain.Services;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Bases.DomainServices;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
@ -23,6 +24,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
private readonly INormalEfCoreRepository<BBAC_CAN_SA, Guid> _repository;
private readonly INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> _detailRepository;
private readonly INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> _notRepository;
private readonly INormalEfCoreRepository<PriceList, Guid> _priceRepository;
private readonly BaseDomainService _service;
public BBAC_NOT_SA_MNG()
{
@ -32,9 +34,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
BaseDomainService service,
INormalEfCoreRepository<BBAC_CAN_SA, Guid> repository,
INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> detailRepository,
INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> notRepository
INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> notRepository,
INormalEfCoreRepository<PriceList, Guid> priceRepository
)
{
_priceRepository = priceRepository;
_repository = repository;
_detailRepository = detailRepository;
_notRepository = notRepository;
@ -42,6 +46,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
public virtual async Task<List<string>> GenerateSettlementOrder(List<BBAC_NOT_SA_DETAIL> p_list)
{
var first = p_list.FirstOrDefault();
List<string> errors = new List<string>();
var priceErrors = await _service.CheckPriceList(p_list, first.Site).ConfigureAwait(false);
@ -52,6 +57,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
errors.Add($"生产号{itm.PN}零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
}
}
if (errors.Count > 0)
{
return errors;

25
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -1136,8 +1136,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
break;
}
var invbill = new INVOICE_GRP
var invbill = new INVOICE_GRP
(guid: GuidGenerator.Create(),
realnvBillNum: string.Empty,
invbillNum: key,
@ -1154,12 +1153,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
taxDiff: 0,
clientCode: string.Empty,
realAmt: readAmt
);
invbill.ClientCode = clientCode;
invbill.Site = dtos.FirstOrDefault().Site;
invlist.Add(invbill);
}
@ -1180,7 +1175,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return _invls;
}
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
public async Task<List<string>> FirstInvoice<TDetail>(List<TDetail> p_list, List<PUB_ADJ_DETAIL> p_adjlist, List<TEMP_CAN_SA_DETAIL> dtos, List<TEMP_NOT_SA_DETAIL> p_notlist, int p_version, string p_InvGroupNum, string p_parentInvBillNum, EnumBusinessType businessType)
where TDetail : SA_CAN_BASE
{
@ -1647,7 +1642,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
//invoiceBillNum = OrderNumberGenerator.GenerateOrderNumber("INV");
}
List<INVOICE_WAIT_DETAIL> _entityDetailList = new List<INVOICE_WAIT_DETAIL>();
foreach (var detail in ls)
{
@ -1715,12 +1709,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
invGroupNum: p_InvGroupNum,
state: SettleBillState.,
invoiceBillState: InvoiceBillState.,
tax: 0.13m,
parent: p_parentInvBillNum,
preTaxDiff: 0,
taxDiff: 0,
clientCode: "C004",
realAmt: realAmt
tax: 0.13m,
parent: p_parentInvBillNum,
preTaxDiff: 0,
taxDiff: 0,
clientCode: "C004",
realAmt: realAmt
);
invbill.Site = dtos.FirstOrDefault().Site;
invbill.CreationTime = DateTime.Now;
@ -1978,7 +1972,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return _invls;
}
[UnitOfWork(IsDisabled = false)]
[UnitOfWork(false)]
/// <summary>
/// 重开一次开票
/// </summary>
@ -2279,6 +2273,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return _invls;
}
[UnitOfWork(false)]
/// <summary>
/// 重开二次开票
/// </summary>

Loading…
Cancel
Save