|
|
@ -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); |
|
|
|