Browse Source

更新版本

master
zhaoxinyu 11 months ago
parent
commit
a7aeb55b27
  1. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
  3. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  4. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PDMakeService.cs
  5. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_PD.cs
  6. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_PD.cs
  7. 41
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  8. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_PD.cs
  9. 10
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/PendingDeduction/PendingDeductionDapperRepository.cs

8
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -300,6 +300,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public List<JIT_UNSETTLED_DETAIL_DTO> UNSETTLED_DETAIL { get; set; }
/// <summary>
/// 发票明细不可结
/// </summary>
public List<INVOICE_WAIT_DETAIL_BJ_DTO> UNSETTLED_INVOICE_WAIT_DETAIL_BJ { get; set; }
}

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

@ -299,13 +299,8 @@ namespace Win.Sfs.SettleAccount.Bases
var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
var dtos = ObjectMapper.Map<List<TEntity>, List<TEntityDto>>(entitys);
// dtos = dtos.Where(p => invbills.Contains(p.BillNum)).ToList();
var entity= entitys.FirstOrDefault();
var invoices =entitys.Select(p => p.BillNum);
var entities=_invRepository.Where(p => invoices.Contains(p.InvbillNum)).ToList();

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

@ -342,11 +342,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
/// <summary>
/// 红冲发票提交到QAD
/// </summary>
@ -769,6 +764,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
};
entity.INVOICE_WAIT_DETAIL_BJ = bjquery.OrderBy(p => p.LineCode).ToList();
var notlist= await _sRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
}
else
{
@ -916,8 +919,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false);
var dtoDetails = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_EXP_DTO>>(entities);
foreach (var itm in dtoDetails)
{
if (DateTime.Parse(itm.CreationTime)==DateTime.MinValue)
@ -929,15 +930,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
var result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
//switch (input.FileType)
//{
// case 0:
// result = await _csv.ExportAsByteArray(dtoDetails);
// break;
// case 1:
// result = await _excel.ExportAsByteArray(dtoDetails);
// break;
//}
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PDMakeService.cs

@ -151,7 +151,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
settleBillNum: itm.InvGroupNum,
state: SettleBillState.,
invGroupNum: itm.InvGroupNum,
site: string.Empty
site: itm.Site,
enumBusinessType: itm.BusinessType
);
bbacmainlist.Add(bbac);
}
@ -294,7 +295,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
settleBillNum: itm.InvGroupNum,
state: SettleBillState.,
invGroupNum: itm.InvGroupNum,
site: string.Empty
site: itm.Site,
enumBusinessType:itm.BusinessType
);
bbacmainlist.Add(bbac);
}

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_PD.cs

@ -30,7 +30,10 @@ namespace SettleAccount.Domain.BQ
{
}
public BBAC_PD(Guid guid, int version, string billNum, string settleBillNum, SettleBillState state, string invGroupNum, string site)
public BBAC_PD(Guid guid, int version, string billNum, string settleBillNum, SettleBillState state, string invGroupNum, string site, EnumBusinessType enumBusinessType)
{
Id = guid;
Version = version;
@ -39,6 +42,7 @@ namespace SettleAccount.Domain.BQ
State = state;
InvGroupNum = invGroupNum;
Site = site;
BusinessType = enumBusinessType;
}
public void SetBusinessType(EnumBusinessType enumBusinessType)
{

4
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_PD.cs

@ -30,7 +30,7 @@ namespace SettleAccount.Domain.BQ
{
}
public HBPO_PD(Guid guid, int version, string billNum, string settleBillNum, SettleBillState state, string invGroupNum, string site)
public HBPO_PD(Guid guid, int version, string billNum, string settleBillNum, SettleBillState state, string invGroupNum, string site, EnumBusinessType enumBusinessType)
{
Id = guid;
Version = version;
@ -39,7 +39,9 @@ namespace SettleAccount.Domain.BQ
State = state;
InvGroupNum = invGroupNum;
Site = site;
BusinessType = enumBusinessType;
}
public void SetBusinessType(EnumBusinessType enumBusinessType)
{
BusinessType = enumBusinessType;

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

@ -32,9 +32,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
public partial class INV_MNG : DomainService
{
//private readonly INormalEfCoreRepository<TCAN_SA, Guid> _canRepository;
@ -380,9 +377,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
/// <returns></returns>
public virtual async Task<bool> ReceivedAsync(List<string> p_invs)
{
var relationList=_relationRepository.ToList();
var relationList=_relationRepository.ToList();
var invList = _repository.Where(p => p_invs.Contains(p.InvbillNum)).ToList();//所有提交发票信息
int count = invList.Select(p => p.InvGroupNum).Distinct().Count();
if (count > 1)
@ -502,7 +499,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
settleBillNum: itm.InvGroupNum,
state: SettleBillState.,
invGroupNum: itm.InvGroupNum,
site: itm.Site
site: itm.Site,
enumBusinessType:itm.BusinessType
);
@ -665,7 +663,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
settleBillNum: itm.InvGroupNum,
state: SettleBillState.,
invGroupNum: itm.InvGroupNum,
site: itm.Site
site: itm.Site,
enumBusinessType:itm.BusinessType
);
bbac.SetBusinessType(itm.BusinessType);
bbacmainlist.Add(bbac);
@ -829,7 +828,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
settleBillNum: itm.InvGroupNum,
state: SettleBillState.,
invGroupNum: itm.InvGroupNum,
site: itm.Site
site: itm.Site,
enumBusinessType:itm.BusinessType
);
@ -1295,13 +1295,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
invoiceGroupNumList.Add(itm.Key);
continue;
}
//var grouplist = dtos.Where(p => p.GroupNum == _itm1.Key).Select(p => p.LU).Distinct().ToList();//每项LU种类
//luList.AddRange(grouplist);
//luList = luList.Distinct().ToList();
//if (luList.Count > 20)//累加零件不超过20种
//{
// continue;
//}
sum += _itm1.Value;
if (sum > 10000000)
{
@ -1330,13 +1324,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
break;
}
//var grouplist = dtos.Where(p => p.GroupNum == _itm1.Key).Select(p => p.LU).Distinct().ToList();//每项LU种类
//luList.AddRange(grouplist);
//luList = luList.Distinct().ToList();
//if (luList.Count > 20)//累加零件不超过20种
//{
// continue;
//}
sum += _itm1.Value;
if (sum > 10000000)
{
@ -2218,17 +2206,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
public async Task<List<string>> BJInvoice<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, bool p_first = true)
where TDetail : SA_CAN_BASE
{
foreach (var itm in p_list)
{
if (itm.Qty < 0)
{
var str = itm.PartCode;
}
}
List<string> _invls = new List<string>();
var _query = dtos.GroupBy(p => new { p.GroupNum }).Select(p => new { GroupNum = p.Key.GroupNum, Amt = p.Sum(itm => itm.Amt) });
Dictionary<string, decimal> dic = new Dictionary<string, decimal>();//原本

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_PD.cs

@ -30,7 +30,7 @@ namespace SettleAccount.Domain.BQ
{
}
public PUB_PD(Guid guid, int version, string billNum, string settleBillNum, SettleBillState state, string invGroupNum, string site)
public PUB_PD(Guid guid, int version, string billNum, string settleBillNum, SettleBillState state, string invGroupNum, string site, EnumBusinessType enumBusinessType)
{
Id = guid;
Version = version;
@ -39,6 +39,7 @@ namespace SettleAccount.Domain.BQ
State = state;
InvGroupNum = invGroupNum;
Site = site;
BusinessType = enumBusinessType;
}
public void SetBusinessType(EnumBusinessType enumBusinessType)
{

10
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/PendingDeduction/PendingDeductionDapperRepository.cs

@ -129,7 +129,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
settleBillNum: entity.SettleBillNum,
state: SettleBillState.,
invGroupNum: entity.InvGroupNum,
site: entity.Site
site: entity.Site,
enumBusinessType:entity.BusinessType
);
var query = from itm in detail
@ -240,7 +242,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
settleBillNum: entity.SettleBillNum,
state: SettleBillState.,
invGroupNum: entity.InvGroupNum,
site: entity.Site
site: entity.Site,
enumBusinessType: entity.BusinessType
);
var query = from itm in detail
@ -352,7 +355,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
settleBillNum: entity.SettleBillNum,
state: SettleBillState.,
invGroupNum: entity.InvGroupNum,
site: entity.Site
site: entity.Site,
enumBusinessType: entity.BusinessType
);
var query = from itm in detail
join itm1 in templist on itm.KeyCode equals itm1.KeyCode

Loading…
Cancel
Save