Browse Source

[CI SKIP]

master
学 赵 1 year ago
parent
commit
f7f6ae1da7
  1. 140
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  2. 139
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  3. 93
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/GenerateJisInvoiceService.cs
  4. 17
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_CAN_SA_MNG.cs

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

@ -101,85 +101,83 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errorList).ConfigureAwait(false) }); return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errorList).ConfigureAwait(false) });
} }
//List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
//customConditionList.Add(new CustomCondition() { Name = "BillNum", Value = invbillNum }); customConditionList.Add(new CustomCondition() { Name = "BillNum", Value = invbillNum });
//customConditionList.Add(new CustomCondition() { Name = "BussinessType", Value = main.BusinessType.ToString() }); customConditionList.Add(new CustomCondition() { Name = "BussinessType", Value = main.BusinessType.ToString() });
await _bbacMng.SetWaitingState(invbillNum);
var _taskid = await _service.ExportEnqueueAsync("生成发票任务", ExportExtentsion.Excel, string.Empty, string.Empty, CurrentUser, typeof(GenerateJisInvoiceService), customConditionList, (rs) =>
{
}).ConfigureAwait(false);
return new JsonResult(new { Code = 200, Message = "生成发票任务" });
//await _bbacMng.SetWaitingState(invbillNum); //if (await _bbacMng.SetForwardState(main, SettleBillState.已开票).ConfigureAwait(false))
//var _taskid = await _service.ExportEnqueueAsync("生成发票任务", ExportExtentsion.Excel, string.Empty, string.Empty, CurrentUser, typeof(GenerateJisInvoiceService), customConditionList, (rs) =>
//{ //{
//}).ConfigureAwait(false); // var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
// var notQuery = await _notRepository.Where(p => p.SettleBillNum == main.SettleBillNum).ToListAsync().ConfigureAwait(false);
// var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_CAN_SA_DETAIL_DTO>>(entitys);
// var q = from d in dto1s
if (await _bbacMng.SetForwardState(main, SettleBillState.).ConfigureAwait(false)) // join p in priceList on d.LU equals p.LU
{ // where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime && p.IsCancel == false && p.ClientCode == main.Site
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); // select new TEMP_CAN_SA_DETAIL
var notQuery = await _notRepository.Where(p => p.SettleBillNum == main.SettleBillNum).ToListAsync().ConfigureAwait(false); // {
var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_CAN_SA_DETAIL_DTO>>(entitys); // SettleBillNum = d.SettleBillNum,
var q = from d in dto1s // Site = d.Site,
join p in priceList on d.LU equals p.LU // Version = d.Version,
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime && p.IsCancel == false && p.ClientCode == main.Site // Price = p.Price,
select new TEMP_CAN_SA_DETAIL // BillNum = d.BillNum,
{ // SettleDate = d.SettleDate,
SettleBillNum = d.SettleBillNum, // InvGroupNum = d.InvGroupNum,
Site = d.Site, // LU = d.LU,
Version = d.Version, // MaterialDesc = d.MaterialDesc,
Price = p.Price, // PN = d.PN,
BillNum = d.BillNum, // Qty = d.Qty,
SettleDate = d.SettleDate, // GroupNum = d.GroupNum,
InvGroupNum = d.InvGroupNum, // Amt = Math.Round(d.Qty * p.Price, 2),
LU = d.LU, // ContractDocID = d.ContractDocID,
MaterialDesc = d.MaterialDesc, // BeginDate = p.BeginTime,
PN = d.PN, // EndDate = p.EndTime,
Qty = d.Qty, // PartCode = d.PartCode
GroupNum = d.GroupNum, // };
Amt = Math.Round(d.Qty * p.Price, 2), // var dtos = q.ToList();
ContractDocID = d.ContractDocID,
BeginDate = p.BeginTime, // if (dtos != null && dtos.Count > 0)
EndDate = p.EndTime, // {
PartCode = d.PartCode // if (invbillNum.Substring(0, 1) == "C")//一次开票
}; // {
var dtos = q.ToList(); // var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL
// {
if (dtos != null && dtos.Count > 0) // KeyCode = p.KeyCode,
{ // Version = p.Version,
if (invbillNum.Substring(0, 1) == "C")//一次开票 // SettleBillNum = p.SettleBillNum,
{ // LU = p.LU,
var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL // PN = p.PN,
{ // Site = p.Site,
KeyCode = p.KeyCode, // Qty = p.Qty,
Version = p.Version, // Price = p.Price,
SettleBillNum = p.SettleBillNum, // BusinessType = p.BusinessType,
LU = p.LU, // IsReturn = "",
PN = p.PN, // InvGroupNum = p.InvGroupNum,
Site = p.Site, // SettleDate = p.SettleDate,
Qty = p.Qty, // GroupNum = p.GroupNum,
Price = p.Price, // ContractDocID = string.Empty,
BusinessType = p.BusinessType, // PartCode = p.PartCode
IsReturn = "",
InvGroupNum = p.InvGroupNum, // }).ToList();//不能结算
SettleDate = p.SettleDate, // await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType).ConfigureAwait(false);
GroupNum = p.GroupNum, // }
ContractDocID = string.Empty, // else//二次开票
PartCode = p.PartCode // {
// await SecInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType).ConfigureAwait(false);
}).ToList();//不能结算 // }
await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType).ConfigureAwait(false); // }
} //}
else//二次开票
{
await SecInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType).ConfigureAwait(false);
}
}
}
} }
else else
{ {
return new JsonResult(new { Code = 400, Message = "不存在可结算单记录" }); return new JsonResult(new { Code = 400, Message = "不存在可结算单记录" });
} }
return new JsonResult(new { Code = 200, Message = "生成成功" });
} }
} }
} }

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

@ -5,6 +5,8 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using SettleAccount.Job.Services;
using TaskJob.EventArgs;
using Volo.Abp.Uow; using Volo.Abp.Uow;
using Win.Abp.Snowflakes; using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
@ -14,8 +16,10 @@ using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant; using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers; using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.BQ.Temp; using Win.Sfs.SettleAccount.Entities.BQ.Temp;
using Win.Sfs.SettleAccount.Entities.Prices; using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
@ -40,6 +44,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
private readonly INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> _notRepository; private readonly INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> _notRepository;
private readonly INormalEfCoreRepository<PriceList, Guid> _priceRepository; private readonly INormalEfCoreRepository<PriceList, Guid> _priceRepository;
private readonly HBPO_CAN_SA_MNG _hbpoMng; private readonly HBPO_CAN_SA_MNG _hbpoMng;
private readonly TaskJobService _service;
public HBPO_CAN_SA_SERVICE(IExcelImportAppService excelImportService, public HBPO_CAN_SA_SERVICE(IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator, ISnowflakeIdGenerator snowflakeIdGenerator,
@ -50,13 +57,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> notRepository, INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> notRepository,
INormalEfCoreRepository<PriceList, Guid> priceRepository, INormalEfCoreRepository<PriceList, Guid> priceRepository,
HBPO_CAN_SA_MNG hbpoMng, HBPO_CAN_SA_MNG hbpoMng,
BaseDomainService baseservice BaseDomainService baseservice,
TaskJobService service
) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, detailRepository, invmng, baseservice) ) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, detailRepository, invmng, baseservice)
{ {
_priceRepository = priceRepository; _priceRepository = priceRepository;
_notRepository = notRepository; _notRepository = notRepository;
_hbpoMng = hbpoMng; _hbpoMng = hbpoMng;
_service = service;
} }
/// <summary> /// <summary>
/// 生成发票 /// 生成发票
@ -83,68 +92,80 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errorList).ConfigureAwait(false) }); return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errorList).ConfigureAwait(false) });
} }
if (await _hbpoMng.SetForwardState(main, SettleBillState.).ConfigureAwait(false))
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "BillNum", Value = invbillnum });
customConditionList.Add(new CustomCondition() { Name = "BussinessType", Value = main.BusinessType.ToString() });
await _hbpoMng.SetWaitingState(invbillnum);
var _taskid = await _service.ExportEnqueueAsync("生成发票任务", ExportExtentsion.Excel, string.Empty, string.Empty, CurrentUser, typeof(GenerateJisInvoiceService), customConditionList, (rs) =>
{ {
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); }).ConfigureAwait(false);
var notQuery = _notRepository.Where(p => p.SettleBillNum == main.SettleBillNum).ToList();
var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
var q = from d in dto1s
join p in priceList on d.LU equals p.LU
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime && p.IsCancel == false && p.ClientCode == main.Site
select new TEMP_CAN_SA_DETAIL
{
SettleBillNum = d.SettleBillNum,
Site = d.Site,
Version = d.Version,
Price = p.Price,
BillNum = d.BillNum,
SettleDate = d.SettleDate,
InvGroupNum = d.InvGroupNum,
LU = d.LU,
MaterialDesc = d.MaterialDesc,
PN = d.PN,
Qty = d.Qty,
GroupNum = d.GroupNum,
Amt = Math.Round(d.Qty * p.Price, 2),
ContractDocID = "no",
BeginDate = p.BeginTime,
EndDate = p.EndTime,
PartCode = d.PartCode
}; return new JsonResult(new { Code = 200, Message = "生成发票任务" });
var dtos = q.ToList();
if (dtos != null && dtos.Count > 0)
{
if (invbillnum.Substring(0, 1) == "C")//一次开票
{
var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL
{
KeyCode = p.KeyCode,
Version = p.Version,
SettleBillNum = p.SettleBillNum,
LU = p.LU,
PN = p.PN,
Site = p.Site,
Qty = p.Qty,
Price = p.Price,
BusinessType = p.BusinessType,
IsReturn = "",
InvGroupNum = p.InvGroupNum,
SettleDate = p.SettleDate,
GroupNum = p.GroupNum,
ContractDocID = string.Empty,
PartCode = p.PartCode
}).ToList();//不能结算
var falg = await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType).ConfigureAwait(false);
}
else//二次开票
{
var flag = await SecInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType).ConfigureAwait(false);
}
} //if (await _hbpoMng.SetForwardState(main, SettleBillState.已开票).ConfigureAwait(false))
} //{
// var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
// var notQuery = _notRepository.Where(p => p.SettleBillNum == main.SettleBillNum).ToList();
// var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
// var q = from d in dto1s
// join p in priceList on d.LU equals p.LU
// where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime && p.IsCancel == false && p.ClientCode == main.Site
// select new TEMP_CAN_SA_DETAIL
// {
// SettleBillNum = d.SettleBillNum,
// Site = d.Site,
// Version = d.Version,
// Price = p.Price,
// BillNum = d.BillNum,
// SettleDate = d.SettleDate,
// InvGroupNum = d.InvGroupNum,
// LU = d.LU,
// MaterialDesc = d.MaterialDesc,
// PN = d.PN,
// Qty = d.Qty,
// GroupNum = d.GroupNum,
// Amt = Math.Round(d.Qty * p.Price, 2),
// ContractDocID = "no",
// BeginDate = p.BeginTime,
// EndDate = p.EndTime,
// PartCode = d.PartCode
// };
// var dtos = q.ToList();
// if (dtos != null && dtos.Count > 0)
// {
// if (invbillnum.Substring(0, 1) == "C")//一次开票
// {
// var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL
// {
// KeyCode = p.KeyCode,
// Version = p.Version,
// SettleBillNum = p.SettleBillNum,
// LU = p.LU,
// PN = p.PN,
// Site = p.Site,
// Qty = p.Qty,
// Price = p.Price,
// BusinessType = p.BusinessType,
// IsReturn = "",
// InvGroupNum = p.InvGroupNum,
// SettleDate = p.SettleDate,
// GroupNum = p.GroupNum,
// ContractDocID = string.Empty,
// PartCode = p.PartCode
// }).ToList();//不能结算
// var falg = await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType).ConfigureAwait(false);
// }
// else//二次开票
// {
// var flag = await SecInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType).ConfigureAwait(false);
// }
// }
//}
} }
else else
{ {

93
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/GenerateJisInvoiceService.cs

@ -11,6 +11,7 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using SettleAccount.Bases; using SettleAccount.Bases;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using ShardingCore.Sharding.MergeContexts;
using TaskJob.EventArgs; using TaskJob.EventArgs;
using TaskJob.Interfaces; using TaskJob.Interfaces;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
@ -35,82 +36,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
public GenerateJisInvoiceService(SettleAccountDbContext dbcontext) public GenerateJisInvoiceService(SettleAccountDbContext dbcontext)
{ {
_dbcontext = dbcontext; _dbcontext = dbcontext;
}
//public string Make(string billNum)
//{
// var main = _dbcontext.Set<T>().FirstOrDefault(p => p.InvGroupNum == billNum);
// //var main = await _bbacMng.GetMainAsync(invbillNum);
// if (main != null)
// {
// var entitys = _dbcontext.Set<BBAC_CAN_SA_DETAIL>().Where(p => p.InvGroupNum == billNum).ToList();//可结算
// var priceList = _dbcontext.Set<PriceList>().Where(p => p.IsCancel == false).ToList();//价格表
// var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
// var notQuery = _dbcontext.Set<BBAC_NOT_SA_DETAIL>().Where(p => p.SettleBillNum == main.SettleBillNum);
// var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_CAN_SA_DETAIL_DTO>>(entitys);
// var q = from d in dto1s
// join p in priceList on d.LU equals p.LU
// where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime && p.IsCancel == false && p.ClientCode == main.Site
// select new TEMP_CAN_SA_DETAIL
// {
// SettleBillNum = d.SettleBillNum,
// Site = d.Site,
// Version = d.Version,
// Price = p.Price,
// BillNum = d.BillNum,
// SettleDate = d.SettleDate,
// InvGroupNum = d.InvGroupNum,
// LU = d.LU,
// MaterialDesc = d.MaterialDesc,
// PN = d.PN,
// Qty = d.Qty,
// GroupNum = d.GroupNum,
// Amt = Math.Round(d.Qty * p.Price, 2),
// ContractDocID = d.ContractDocID,
// BeginDate = p.BeginTime,
// EndDate = p.EndTime,
// PartCode = d.PartCode
// };
// var dtos = q.ToList();
// if (dtos != null && dtos.Count > 0)
// {
// if (billNum.Substring(0, 1) == "C")//一次开票
// {
// var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL
// {
// KeyCode = p.KeyCode,
// Version = p.Version,
// SettleBillNum = p.SettleBillNum,
// LU = p.LU,
// PN = p.PN,
// Site = p.Site,
// Qty = p.Qty,
// Price = p.Price,
// BusinessType = p.BusinessType,
// IsReturn = "",
// InvGroupNum = p.InvGroupNum,
// SettleDate = p.SettleDate,
// GroupNum = p.GroupNum,
// ContractDocID = string.Empty,
// PartCode = p.PartCode
// }).ToList();//不能结算
// FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
// }
// else//二次开票
// {
// SecInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
// }
// }
// }
//}
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {
var billNum = property.Where(p => p.Name == "BillNum").FirstOrDefault().Value; var billNum = property.Where(p => p.Name == "BillNum").FirstOrDefault().Value;
@ -506,8 +433,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
return _invls; return _invls;
} }
[UnitOfWork(false)]
public 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) public 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 where TDetail : SA_CAN_BASE
{ {
List<string> _invls = new List<string>(); List<string> _invls = new List<string>();
@ -795,18 +722,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
// 执行批量数据操作 // 执行批量数据操作
if (salist.Count > 0) if (salist.Count > 0)
{ {
_dbcontext.BulkUpdateAsync(salist).ConfigureAwait(false); _dbcontext.BulkUpdate(salist);
} }
_dbcontext.BulkInsertAsync(invlist).ConfigureAwait(false); _dbcontext.BulkInsert(invlist);
_dbcontext.BulkInsertAsync(groupList).ConfigureAwait(false); _dbcontext.BulkInsert(groupList);
_dbcontext.BulkInsertAsync(detailList).ConfigureAwait(false); _dbcontext.BulkInsert(detailList);
if (adjlist.Count > 0) if (adjlist.Count > 0)
{ {
_dbcontext.BulkInsertAsync(adjlist).ConfigureAwait(false); _dbcontext.BulkInsert(adjlist);
} }
if (notDetialList.Count > 0) if (notDetialList.Count > 0)
{ {
_dbcontext.BulkInsertAsync(notDetialList).ConfigureAwait(false); _dbcontext.BulkInsert(notDetialList);
} }
// 提交事务 // 提交事务
// transaction.Commit(); // transaction.Commit();

17
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_CAN_SA_MNG.cs

@ -217,6 +217,22 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return false; return false;
; ;
} }
public virtual async Task<bool> SetWaitingState(string billNum)
{
var entity = await GetMainAsync(billNum).ConfigureAwait(false);
if (entity != null)
{
entity.State = SettleBillState.;
await _repository.UpdateAsync(entity).ConfigureAwait(false);
return true;
}
return false;
;
}
/// <summary> /// <summary>
/// 获得所有明细 /// 获得所有明细
/// </summary> /// </summary>
@ -266,6 +282,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return await _detailRepository.Where(p => p_invs.Contains(p.InvbillNum)).ToListAsync().ConfigureAwait(false); return await _detailRepository.Where(p => p_invs.Contains(p.InvbillNum)).ToListAsync().ConfigureAwait(false);
} }
} }
} }

Loading…
Cancel
Save