Browse Source

添加发票明细中文描述

master
学 赵 1 year ago
parent
commit
13ff2997f0
  1. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  2. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs
  3. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  4. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs
  5. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

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

@ -133,11 +133,17 @@ namespace Win.Sfs.SettleAccount.Bases
public virtual async Task<INVOICE_GRP_DETAIL_DTO> DetailQueryAsync(INVOICE_GRP_REQ_DTO input)
{
INVOICE_GRP_DETAIL_DTO entity = new INVOICE_GRP_DETAIL_DTO();
var materialList = await _baseservice.GetMaterialList().ConfigureAwait(false);
var invs = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
var m = await _mRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
var mdtos = ObjectMapper.Map<List<INVOICE_MAP_GROUP>, List<INVOICE_MAP_GROUP_DTO>>(m);
var first = invs.FirstOrDefault();
var materialList = await _baseservice.GetMaterialList(first.BusinessType).ConfigureAwait(false);
//if (materialList.Count == 0)
//{
// throw new UserFriendlyException($" 零件关系表无对应业务,零件关系记录!", "400");
//}
if (invs.FirstOrDefault().BusinessType == EnumBusinessType.JisBBAC)
{
@ -150,7 +156,7 @@ namespace Win.Sfs.SettleAccount.Bases
select
new INVOICE_WAIT_DETAIL_BBAC_DTO()
{
PartDesc = tm == null ? string.Empty : itm.PartDesc,
PartDesc = tm == null ? string.Empty : tm.MaterialDesc,
InvDate = itm1.CreationTime,
RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
Version = itm.Version,
@ -422,14 +428,12 @@ namespace Win.Sfs.SettleAccount.Bases
[HttpPost]
public virtual async Task<IActionResult> ReceivedAsync(List<string> p_ins)
{
bool issuc = await _invMng.ReceivedAsync(p_ins).ConfigureAwait(false);
if (issuc == true)
{
return new JsonResult(new { Code = 200, Message = "收票成功" });
}
return new JsonResult(new { Code = 400, Message = "收票失败" });
}
protected virtual async Task<List<INVOICE_MAP_GROUP_DTO>> GetMapGroupAsync(INVOICE_GRP_REQ_DTO input)

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs

@ -48,7 +48,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
else
{
var errors = await _bbacNotMng.GenerateSettlementOrder(entitys).ConfigureAwait(false);
if (errors.Count > 0)
{

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

@ -17,6 +17,7 @@ using SettleAccount.Domain.BQ;
using ShardingCore.Extensions;
using Shouldly;
using SqlSugar;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Data;
@ -154,19 +155,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public virtual async Task<INVOICE_GRP_DETAIL_DTO> DetailQueryAsync(INVOICE_GRP_REQ_DTO input)
{
INVOICE_GRP_DETAIL_DTO entity = new INVOICE_GRP_DETAIL_DTO();
input.Filters.Add(new FilterCondition("InvoiceState", "1", EnumFilterAction.Equal, EnumFilterLogic.And));
var materialList = await _baseservice.GetMaterialList().ConfigureAwait(false);
var invs = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
var m = await _mRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
var mdtos = ObjectMapper.Map<List<INVOICE_MAP_GROUP>, List<INVOICE_MAP_GROUP_DTO>>(m);
var first = invs.FirstOrDefault();
var materialList = await _baseservice.GetMaterialList(first.BusinessType).ConfigureAwait(false);
//if (materialList.Count == 0)
//{
// throw new UserFriendlyException($" 零件关系表无对应业务,零件关系记录!", "400");
//}
if (invs.FirstOrDefault().BusinessType == EnumBusinessType.JisBBAC)
{
var A = await _wRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
@ -178,7 +176,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
select
new INVOICE_WAIT_DETAIL_BBAC_DTO()
{
PartDesc = tm == null ? string.Empty : itm.PartDesc,
PartDesc = tm == null ? string.Empty : tm.MaterialDesc,
InvDate = itm1.CreationTime,
RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
Version = itm.Version,
@ -286,7 +284,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
select
new INVOICE_WAIT_DETAIL_DTO()
{
PartDesc = tm == null ? string.Empty : itm.PartDesc,
PartDesc = tm == null ? string.Empty : tm.MaterialDesc,
InvDate = itm1.CreationTime,
RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
Version = itm.Version,
@ -456,7 +454,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
IExporter _csv = new CsvExporter();
ExcelExporter _excel = new ExcelExporter();
var materialList = await _baseservice.GetMaterialList().ConfigureAwait(false);
// var materialList = await _baseservice.GetMaterialList().ConfigureAwait(false);
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false);
var first = entities.FirstOrDefault();
var dtoDetails = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_EXP_DTO>>(entities);

16
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs

@ -43,15 +43,25 @@ namespace Win.Sfs.SettleAccount.Bases.DomainServices
_bomshipRepository = bomshipRepository;
}
public async Task<List<MaterialRelationship>> GetMaterialList()
public async Task<List<MaterialRelationship>> GetMaterialList(EnumBusinessType businessType)
{
List<MaterialRelationship> ls = new List<MaterialRelationship>();
var lst = await _relationshipRepository.Where(p => !string.IsNullOrEmpty(p.SettleMaterialCode)).ToListAsync().ConfigureAwait(false);
var lst = await _relationshipRepository.Where(p => !string.IsNullOrEmpty(p.SettleMaterialCode) && p.BusinessType==businessType).ToListAsync().ConfigureAwait(false);
var l = lst.GroupBy(p => p.SettleMaterialCode).Select(g => g.First());
return l.ToList();
}
//public async Task<List<MaterialRelationship>> CheckRelationlList(EnumBusinessType businessType,)
//{
// List<MaterialRelationship> ls = new List<MaterialRelationship>();
// var lst = await _relationshipRepository.Where(p => !string.IsNullOrEmpty(p.SettleMaterialCode) && p.BusinessType == businessType).ToListAsync().ConfigureAwait(false);
// var l = lst.GroupBy(p => p.SettleMaterialCode).Select(g => g.First());
// return l.ToList();
//}
public static async Task DoWorkBulkWithTransaction(DbContext dbContext, Action p_dowork)
{
using (var transaction = await dbContext.Database.BeginTransactionAsync().ConfigureAwait(false))

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

@ -91,9 +91,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode==site).ToList();//价格单
}
if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC
|| first.BusinessType == EnumBusinessType.BeiJian || first.BusinessType == EnumBusinessType.YinDuJian
)
@ -123,8 +120,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return errors;
}
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new PUB_CAN_SA();
_entity.SetId(Guid.NewGuid());

Loading…
Cancel
Save